backup: live-stand vor erstem git-deployment
This commit is contained in:
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
userdata/
|
||||||
|
components/
|
||||||
|
plugins/
|
||||||
|
config/
|
||||||
|
img/
|
||||||
|
vendor/
|
||||||
|
|
||||||
|
|
||||||
|
*.json
|
||||||
|
*.env
|
||||||
|
*.pdf
|
||||||
|
*.sql
|
||||||
|
*.xlsx
|
||||||
|
*.ttf
|
||||||
|
*.woff
|
||||||
|
*.log
|
||||||
|
*.eot
|
||||||
|
*.svg
|
||||||
|
*.db
|
||||||
|
*.ico
|
||||||
|
*.csv
|
||||||
|
*.png
|
||||||
130
.htaccess
Normal file
130
.htaccess
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
AddDefaultCharset UTF-8
|
||||||
|
|
||||||
|
|
||||||
|
# Video support
|
||||||
|
AddType video/ogg .ogv
|
||||||
|
AddType video/mp4 .mp4
|
||||||
|
AddType video/webm .webm
|
||||||
|
AddType video/ogv .ogv
|
||||||
|
|
||||||
|
# Audio support
|
||||||
|
AddType audio/mp3 .mp3
|
||||||
|
AddType audio/oga .oga
|
||||||
|
AddType audio/ogg .ogg
|
||||||
|
AddType audio/wav .wav
|
||||||
|
|
||||||
|
# For HLS support
|
||||||
|
AddType application/x-mpegURL .m3u8
|
||||||
|
AddType vnd.apple.mpegURL .m3u8
|
||||||
|
AddType video/MP2T .ts
|
||||||
|
|
||||||
|
# For M(PEG)-DASH support
|
||||||
|
AddType application/dash+xml .mpd
|
||||||
|
|
||||||
|
# For subtitles support
|
||||||
|
AddType text/vtt .vtt
|
||||||
|
AddType text/srt .srt
|
||||||
|
AddType text/calendar .ics
|
||||||
|
|
||||||
|
# Deflate Compression by FileType
|
||||||
|
<IfModule mod_deflate.c>
|
||||||
|
AddOutputFilterByType DEFLATE text/plain
|
||||||
|
AddOutputFilterByType DEFLATE text/html
|
||||||
|
AddOutputFilterByType DEFLATE text/xml
|
||||||
|
AddOutputFilterByType DEFLATE text/css
|
||||||
|
AddOutputFilterByType DEFLATE text/javascript
|
||||||
|
AddOutputFilterByType DEFLATE application/xml
|
||||||
|
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||||
|
AddOutputFilterByType DEFLATE application/rss+xml
|
||||||
|
AddOutputFilterByType DEFLATE application/atom_xml
|
||||||
|
AddOutputFilterByType DEFLATE application/javascript
|
||||||
|
AddOutputFilterByType DEFLATE application/x-javascript
|
||||||
|
AddOutputFilterByType DEFLATE application/x-shockwave-flash
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# turns cache on for 1 month
|
||||||
|
<IfModule mod_expires.c>
|
||||||
|
ExpiresActive On
|
||||||
|
ExpiresByType text/css "access plus 1 month"
|
||||||
|
ExpiresByType text/javascript "access plus 1 month"
|
||||||
|
ExpiresByType text/html "access plus 1 month"
|
||||||
|
ExpiresByType application/javascript "access plus 1 month"
|
||||||
|
ExpiresByType image/gif "access plus 1 month"
|
||||||
|
ExpiresByType image/jpeg "access plus 1 month"
|
||||||
|
ExpiresByType image/png "access plus 1 month"
|
||||||
|
ExpiresByType image/x-icon "access plus 1 month"
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<ifmodule mod_headers.c>
|
||||||
|
<filesmatch "\\.(ico|jpe?g|png|gif|swf)$">
|
||||||
|
Header set Cache-Control "max-age=2592000, public"
|
||||||
|
</filesmatch>
|
||||||
|
<filesmatch "\\.(css)$">
|
||||||
|
Header set Cache-Control "max-age=604800, public"
|
||||||
|
</filesmatch>
|
||||||
|
<filesmatch "\\.(js)$">
|
||||||
|
Header set Cache-Control "max-age=216000, private"
|
||||||
|
</filesmatch>
|
||||||
|
</ifmodule>
|
||||||
|
|
||||||
|
|
||||||
|
<ifmodule mod_headers.c>
|
||||||
|
SetEnvIf Host ^dc-test\.de$ is_on_dev_site
|
||||||
|
Header set X-Robots-Tag "noindex, nofollow" env=is_on_dev_site
|
||||||
|
</ifmodule>
|
||||||
|
|
||||||
|
|
||||||
|
RewriteEngine on
|
||||||
|
|
||||||
|
|
||||||
|
#FallbackResource /mysyde/frontend/frontend.php
|
||||||
|
|
||||||
|
|
||||||
|
RewriteRule ^layout/frontend/css/([^/.]*)/([^/.]*)/$ /mysyde/frontend/css.php?layout_id=$1&page_id=$2 [L,QSA]
|
||||||
|
|
||||||
|
RewriteRule ^mysyde$ /mysyde/admin/admin.php [L,QSA]
|
||||||
|
RewriteRule ^mysyde/$ /mysyde/admin/admin.php?site=$1 [L,QSA]
|
||||||
|
RewriteRule ^mysyde/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2 [L,QSA]
|
||||||
|
RewriteRule ^mysyde/([^/.]*)/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2&level_1=$3 [L,QSA]
|
||||||
|
RewriteRule ^mysyde/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2&level_1=$3&level_2=$4 [L,QSA]
|
||||||
|
RewriteRule ^mysyde/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2&level_1=$3&level_2=$4&level_3=$5 [L,QSA]
|
||||||
|
|
||||||
|
# RewriteRule ^dc$ /mysyde/admin/admin.php [L,QSA]
|
||||||
|
# RewriteRule ^dc/$ /mysyde/admin/admin.php?site=$1 [L,QSA]
|
||||||
|
# RewriteRule ^dc/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2 [L,QSA]
|
||||||
|
# RewriteRule ^dc/([^/.]*)/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2&level_1=$3 [L,QSA]
|
||||||
|
# RewriteRule ^dc/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2&level_1=$3&level_2=$4 [L,QSA]
|
||||||
|
# RewriteRule ^dc/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/admin/admin.php?site=$1&language=$2&level_1=$3&level_2=$4&level_3=$5 [L,QSA]
|
||||||
|
|
||||||
|
# userdata immer ueber Session-Controller
|
||||||
|
RewriteRule ^userdata/?$ /mysyde/frontend/frontend_userdata_controller.php [L,QSA]
|
||||||
|
RewriteRule ^userdata/(.+)$ /mysyde/frontend/frontend_userdata_controller.php?file=$1 [L,B,QSA]
|
||||||
|
|
||||||
|
# layout weiterhin direkt ausliefern
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^layout($|/) - [L]
|
||||||
|
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^((?!dc).*)$ /mysyde/frontend/frontend.php [L,QSA]
|
||||||
|
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/shop/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=shop&slevel_1=$3 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/shop/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=shop&slevel_1=$3&slevel_2=$4 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/shop/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=shop&slevel_1=$3&slevel_2=$4&slevel_3=$5 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/shop/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=shop&slevel_1=$3&slevel_2=$4&slevel_3=$5&slevel_4=$6 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/shop/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=shop&slevel_1=$3&slevel_2=$4&slevel_3=$5&slevel_4=$6&slevel_5=$7 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/shop/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=shop&slevel_1=$3&slevel_2=$4&slevel_3=$5&slevel_4=$6&slevel_5=$7&slevel_6=$8 [L,QSA]
|
||||||
|
|
||||||
|
#RewriteRule ^(.*)$ /mysyde/frontend/frontend.php [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=$3 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=$3&level_2=$4 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=$3&level_2=$4&level_3=$5 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=$3&level_2=$4&level_3=$5&level_4=$6 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=$3&level_2=$4&level_3=$5&level_4=$6&level_5=$7 [L,QSA]
|
||||||
|
#RewriteRule ^([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/([^/.]*)/$ /mysyde/frontend/frontend.php?site=$1&language=$2&level_1=$3&level_2=$4&level_3=$5&level_4=$6&level_5=$7&level_6=$8 [L,QSA]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
15
.well-known/acme-challenge/.htaccess
Normal file
15
.well-known/acme-challenge/.htaccess
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Require all granted
|
||||||
|
Satisfy Any
|
||||||
|
Order Deny,Allow
|
||||||
|
Allow from all
|
||||||
|
|
||||||
|
<FilesMatch "^\.">
|
||||||
|
# Require all denied
|
||||||
|
Order Allow,Deny
|
||||||
|
Deny from all
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
535
Gulpfile.js
Normal file
535
Gulpfile.js
Normal file
@@ -0,0 +1,535 @@
|
|||||||
|
|
||||||
|
var shopconfig = require('./config.json');
|
||||||
|
|
||||||
|
var config = "";
|
||||||
|
var shoptype = shopconfig.shoptype;
|
||||||
|
|
||||||
|
if(shoptype == 2) {
|
||||||
|
config = shopconfig.b2b;
|
||||||
|
}else {
|
||||||
|
config = shopconfig.b2c;
|
||||||
|
}
|
||||||
|
|
||||||
|
var insert = require('gulp-insert');
|
||||||
|
|
||||||
|
var bowerdir = config.bower.path,
|
||||||
|
srcdir = config.layout.path + config.layout.code + "/" + config.layout.src,
|
||||||
|
builddir = config.layout.path + config.layout.code + "/" + config.layout.build,
|
||||||
|
distdir = config.layout.path + config.layout.code + "/" + config.layout.dist,
|
||||||
|
fontName = config.iconfont.name,
|
||||||
|
faviconTitle = config.favicon.title,
|
||||||
|
faviconBackground = config.favicon.background,
|
||||||
|
faviconColor = config.favicon.color,
|
||||||
|
faviconMasterpicture = config.layout.path + config.layout.code + "/" + config.layout.src + "/" + config.favicon.masterpicture_path + config.favicon.masterpicture_filename,
|
||||||
|
faviconDataFile = config.layout.path + config.layout.code + "/" + config.layout.dist + "/" + config.favicon.masterpicture_path + config.favicon.data_file;
|
||||||
|
|
||||||
|
var gulp = require('gulp'),
|
||||||
|
changed = require('gulp-changed'),
|
||||||
|
concat = require ('gulp-concat'),
|
||||||
|
uglify = require ('gulp-uglify'),
|
||||||
|
rename = require('gulp-rename'),
|
||||||
|
imageMin = require ('gulp-imageMin'),
|
||||||
|
clean = require('gulp-clean'),
|
||||||
|
less = require ('gulp-less'),
|
||||||
|
minifyCSS = require ('gulp-clean-css'),
|
||||||
|
iconfont = require ('gulp-iconfont'),
|
||||||
|
iconfontCss = require('gulp-iconfont-css'),
|
||||||
|
realFavicon = require ('gulp-real-favicon'),
|
||||||
|
fs = require('fs'),
|
||||||
|
autoprefixer = require ('gulp-autoprefixer'),
|
||||||
|
runSequence = require('run-sequence'),
|
||||||
|
streamqueue = require('streamqueue'),
|
||||||
|
sourcemaps = require('gulp-sourcemaps');
|
||||||
|
|
||||||
|
gulp.task('generate-iconfont', function(){
|
||||||
|
gulp.src([srcdir + '/icons_svg/*.svg'])
|
||||||
|
.pipe(iconfontCss({
|
||||||
|
fontName: fontName,
|
||||||
|
path: srcdir + '/less/template/_icons.less',
|
||||||
|
targetPath: '../../../src/less/app/icons.less',
|
||||||
|
fontPath: builddir + '/fonts/icons/'
|
||||||
|
}))
|
||||||
|
.pipe(iconfont({
|
||||||
|
fontName: fontName
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest(builddir + '/fonts/icons/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('clean-dist',function () {
|
||||||
|
return gulp.src(distdir, {read: false})
|
||||||
|
.pipe(clean());
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('generate-favicon', function(done) {
|
||||||
|
realFavicon.generateFavicon({
|
||||||
|
masterPicture: faviconMasterpicture,
|
||||||
|
dest: distdir + '/favicons/',
|
||||||
|
iconsPath: '/',
|
||||||
|
design: {
|
||||||
|
ios: {
|
||||||
|
pictureAspect: 'noChange',
|
||||||
|
assets: {
|
||||||
|
ios6AndPriorIcons: false,
|
||||||
|
ios7AndLaterIcons: false,
|
||||||
|
precomposedIcons: false,
|
||||||
|
declareOnlyDefaultIcon: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
desktopBrowser: {},
|
||||||
|
windows: {
|
||||||
|
pictureAspect: 'noChange',
|
||||||
|
backgroundColor: faviconBackground,
|
||||||
|
onConflict: 'override',
|
||||||
|
assets: {
|
||||||
|
windows80Ie10Tile: false,
|
||||||
|
windows10Ie11EdgeTiles: {
|
||||||
|
small: false,
|
||||||
|
medium: true,
|
||||||
|
big: false,
|
||||||
|
rectangle: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
androidChrome: {
|
||||||
|
pictureAspect: 'noChange',
|
||||||
|
themeColor: faviconBackground,
|
||||||
|
manifest: {
|
||||||
|
name: faviconTitle,
|
||||||
|
display: 'standalone',
|
||||||
|
orientation: 'notSet',
|
||||||
|
onConflict: 'override',
|
||||||
|
declared: true
|
||||||
|
},
|
||||||
|
assets: {
|
||||||
|
legacyIcon: false,
|
||||||
|
lowResolutionIcons: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
safariPinnedTab: {
|
||||||
|
pictureAspect: 'blackAndWhite',
|
||||||
|
threshold: 82.8125,
|
||||||
|
themeColor: faviconColor
|
||||||
|
}
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
scalingAlgorithm: 'Mitchell',
|
||||||
|
errorOnImageTooSmall: false
|
||||||
|
},
|
||||||
|
markupFile: distdir + "/favicons/faviconData.json"
|
||||||
|
}, function() {
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('check-for-favicon-update', function(done) {
|
||||||
|
var currentVersion = JSON.parse(fs.readFileSync(distdir + "/favicons/faviconData.json")).version;
|
||||||
|
realFavicon.checkForUpdates(currentVersion, function(err) {
|
||||||
|
if (err) {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('minify-images', function() {
|
||||||
|
var imgSrc = srcdir + '/images/**/*',
|
||||||
|
imgDst = distdir + '/images/';
|
||||||
|
|
||||||
|
gulp.src(imgSrc)
|
||||||
|
.pipe(changed(imgSrc))
|
||||||
|
.pipe(imageMin()).on('error', onError)
|
||||||
|
.pipe(gulp.dest(imgDst));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('uglify-js', function () {
|
||||||
|
return gulp.src(distdir + '/js/*.js')
|
||||||
|
.pipe(uglify()).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/js/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('minify-css', function() {
|
||||||
|
return gulp.src(distdir + '/css/*.css')
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('copy', function() {
|
||||||
|
gulp.src(srcdir + '/fonts/**/*')
|
||||||
|
.pipe(gulp.dest(distdir + '/fonts/'));
|
||||||
|
gulp.src(srcdir + '/images/**/*')
|
||||||
|
.pipe(gulp.dest(distdir + '/images/'));
|
||||||
|
gulp.src(builddir + '/favicons/**/*')
|
||||||
|
.pipe(gulp.dest(distdir + '/favicons/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styles_fck', function() {
|
||||||
|
gulp.src(srcdir + "/less/app/fck.less")
|
||||||
|
.pipe(less()).on('error', onError)
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + "/css/"));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('bootstrap-less',function () {
|
||||||
|
gulp.src(bowerdir + "/bootstrap/less/bootstrap.less")
|
||||||
|
.pipe(less()).on('error', onError)
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(builddir + "/css/"));
|
||||||
|
})
|
||||||
|
gulp.task('bootstrap-js',function () {
|
||||||
|
gulp.src([
|
||||||
|
bowerdir + '/bootstrap/js/affix.js',
|
||||||
|
bowerdir + '/bootstrap/js/alert.js',
|
||||||
|
bowerdir + '/bootstrap/js/button.js',
|
||||||
|
//bowerdir + '/bootstrap/js/carousel.js',
|
||||||
|
//bowerdir + '/bootstrap/js/collapse.js',
|
||||||
|
//bowerdir + '/bootstrap/js/dropdown.js',
|
||||||
|
bowerdir + '/bootstrap/js/modal.js',
|
||||||
|
//bowerdir + '/bootstrap/js/popover.js',
|
||||||
|
//bowerdir + '/bootstrap/js/scrollspy.js',
|
||||||
|
//bowerdir + '/bootstrap/js/tab.js',
|
||||||
|
bowerdir + '/bootstrap/js/tooltip.js',
|
||||||
|
bowerdir + '/bootstrap/js/transition.js',
|
||||||
|
bowerdir + '/jsvat/dist/jsvat.js'
|
||||||
|
])
|
||||||
|
.pipe(insert.append(';'))
|
||||||
|
.pipe(concat('bootstrap.js'))
|
||||||
|
.pipe(gulp.dest(builddir + '/js/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('watch', function () {
|
||||||
|
gulp.watch(srcdir + '/less/**/*.less',['styles_dev']);
|
||||||
|
gulp.watch(srcdir + '/less/**/**/*.less',['styles_dev']);
|
||||||
|
gulp.watch(srcdir + '/js/**/*.js', ['scripts']);
|
||||||
|
gulp.watch('./mysyde/**/*.js', ['scripts']);
|
||||||
|
});
|
||||||
|
|
||||||
|
//B2B Catalog & Login
|
||||||
|
if(shoptype == 2) {
|
||||||
|
gulp.task('concat-js-b2b-components',function () {
|
||||||
|
return gulp.src([
|
||||||
|
bowerdir + '/jquery/jquery.min.js',
|
||||||
|
builddir + '/js/bootstrap.js',
|
||||||
|
bowerdir + '/jquery-hoverIntent/jquery.hoverIntent.js',
|
||||||
|
bowerdir + '/seiyria-bootstrap-slider/dist/bootstrap-slider.min.js',
|
||||||
|
bowerdir + '/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
|
||||||
|
bowerdir + '/owl.carousel/dist/owl.carousel.min.js',
|
||||||
|
bowerdir + '/magicscroll/magicscroll.js',
|
||||||
|
bowerdir + '/magiczoomplus/magiczoomplus.js',
|
||||||
|
bowerdir + '/password-strength-meter/dist/password.min.js',
|
||||||
|
'./mysyde/common/cookie-bar/cookiebar-latest.js',
|
||||||
|
'./mysyde/common/common.js',
|
||||||
|
'./module/dcshop/common/dc_functions.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('components_b2b.js'))
|
||||||
|
.pipe(gulp.dest(builddir + '/js/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('concat-js-catalog-components',function () {
|
||||||
|
return gulp.src([
|
||||||
|
bowerdir + '/jquery/jquery.min.js',
|
||||||
|
builddir + '/js/bootstrap.js',
|
||||||
|
bowerdir + '/jquery-hoverIntent/jquery.hoverIntent.js',
|
||||||
|
bowerdir + '/seiyria-bootstrap-slider/dist/bootstrap-slider.min.js',
|
||||||
|
bowerdir + '/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
|
||||||
|
bowerdir + '/owl.carousel/dist/owl.carousel.min.js',
|
||||||
|
bowerdir + '/magicscroll/magicscroll.js',
|
||||||
|
bowerdir + '/magiczoomplus/magiczoomplus.js',
|
||||||
|
'./mysyde/common/common.js',
|
||||||
|
'./module/dcshop/common/dc_functions.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('components_catalog.js'))
|
||||||
|
.pipe(gulp.dest(builddir + '/js/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('concat-css-components',function () {
|
||||||
|
return gulp.src([
|
||||||
|
bowerdir + '/normalize-css/normalize.css',
|
||||||
|
bowerdir + '/font-awesome/css/font-awesome.min.css',
|
||||||
|
bowerdir + '/material-design-icons/iconfont/material-icons.css',
|
||||||
|
builddir + '/css/bootstrap.css',
|
||||||
|
bowerdir + '/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css',
|
||||||
|
bowerdir + '/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css',
|
||||||
|
bowerdir + '/animate.css/animate.min.css',
|
||||||
|
bowerdir + '/owl.carousel/dist/assets/owl.carousel.min.css',
|
||||||
|
bowerdir + '/owl.carousel/dist/assets/owl.theme.default.min.css',
|
||||||
|
bowerdir + '/password-strength-meter/dist/password.min.css',
|
||||||
|
bowerdir + '/magicscroll/magicscroll.css',
|
||||||
|
bowerdir + '/magiczoomplus/magiczoomplus.css'
|
||||||
|
])
|
||||||
|
.pipe(concat('components.css')).on('error', onError)
|
||||||
|
.pipe(gulp.dest(builddir + '/css/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('styles_dev', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
gulp.src(builddir + '/css/components.css')
|
||||||
|
.pipe(gulp.dest(distdir + '/css/')),
|
||||||
|
|
||||||
|
gulp.src(srcdir + "/less/app/style_catalog.less")
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(sourcemaps.write("."))
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
.pipe(concat('style_catalog.css')).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/')),
|
||||||
|
|
||||||
|
gulp.src(srcdir + "/less/app/style_b2b.less")
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(sourcemaps.write("."))
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
.pipe(concat('style_b2b.css')).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/')),
|
||||||
|
|
||||||
|
gulp.src(srcdir + "/less/app/style_login.less")
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(sourcemaps.write("."))
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
.pipe(concat('style_login.css')).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styles_public_b2b', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
gulp.src(builddir + '/css/components.css').on('error', onError),
|
||||||
|
gulp.src(srcdir + "/less/app/style_b2b.less")
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
)
|
||||||
|
.pipe(concat('style_b2b.min.css')).on('error', onError)
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styles_public_catalog', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
gulp.src(builddir + '/css/components.css').on('error', onError),
|
||||||
|
gulp.src(srcdir + "/less/app/style_catalog.less")
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
)
|
||||||
|
.pipe(concat('style_catalog.min.css')).on('error', onError)
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styles_public_login', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
gulp.src(builddir + '/css/components.css').on('error', onError),
|
||||||
|
gulp.src(srcdir + "/less/app/style_login.less")
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
)
|
||||||
|
.pipe(concat('style_login.min.css')).on('error', onError)
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styles_public', function(callback) {
|
||||||
|
runSequence(
|
||||||
|
[
|
||||||
|
'styles_public_b2b',
|
||||||
|
'styles_public_catalog',
|
||||||
|
'styles_public_login'
|
||||||
|
],
|
||||||
|
callback);
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('scripts', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
gulp.src([
|
||||||
|
builddir + '/js/components_catalog.js',
|
||||||
|
srcdir + '/js/script_catalog.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('script_catalog.js'))
|
||||||
|
.pipe(gulp.dest(distdir + '/js/')),
|
||||||
|
|
||||||
|
gulp.src([
|
||||||
|
builddir + '/js/components_b2b.js',
|
||||||
|
srcdir + '/js/script_b2b.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('script_b2b.js'))
|
||||||
|
.pipe(gulp.dest(distdir + '/js/')),
|
||||||
|
|
||||||
|
gulp.src([
|
||||||
|
builddir + '/js/components_catalog.js',
|
||||||
|
srcdir + '/js/script_login.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('script_login.js'))
|
||||||
|
.pipe(gulp.dest(distdir + '/js/'))
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default', function(callback) {
|
||||||
|
runSequence(
|
||||||
|
'clean-dist',
|
||||||
|
'bootstrap-less',
|
||||||
|
'bootstrap-js',
|
||||||
|
'concat-css-components',
|
||||||
|
'concat-js-catalog-components',
|
||||||
|
'concat-js-b2b-components',
|
||||||
|
'generate-iconfont',
|
||||||
|
'styles_dev',
|
||||||
|
'scripts',
|
||||||
|
'copy',
|
||||||
|
'watch',
|
||||||
|
callback);
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('public', function(callback) {
|
||||||
|
runSequence(
|
||||||
|
'clean-dist',
|
||||||
|
'bootstrap-less',
|
||||||
|
'bootstrap-js',
|
||||||
|
'concat-css-components',
|
||||||
|
'concat-js-catalog-components',
|
||||||
|
'concat-js-b2b-components',
|
||||||
|
'generate-iconfont',
|
||||||
|
'styles_public',
|
||||||
|
'styles_fck',
|
||||||
|
'scripts',
|
||||||
|
'uglify-js',
|
||||||
|
'copy',
|
||||||
|
'minify-images',
|
||||||
|
'generate-favicon',
|
||||||
|
callback);
|
||||||
|
});
|
||||||
|
//B2C
|
||||||
|
}else{
|
||||||
|
gulp.task('concat-js-components',function () {
|
||||||
|
return gulp.src([
|
||||||
|
bowerdir + '/jquery/jquery.min.js',
|
||||||
|
bowerdir + '/mediaelement/build/mediaelement-and-player.min.js',
|
||||||
|
builddir + '/js/bootstrap.js',
|
||||||
|
bowerdir + '/jquery-hoverIntent/jquery.hoverIntent.js',
|
||||||
|
bowerdir + '/bxslider/jquery.bxslider-rahisified.min.js',
|
||||||
|
bowerdir + '/seiyria-bootstrap-slider/dist/bootstrap-slider.min.js',
|
||||||
|
bowerdir + '/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
|
||||||
|
bowerdir + '/owl.carousel/dist/owl.carousel.min.js',
|
||||||
|
bowerdir + '/magicscroll/magicscroll.js',
|
||||||
|
bowerdir + '/magiczoomplus/magiczoomplus.js',
|
||||||
|
bowerdir + '/password-strength-meter/dist/password.min.js',
|
||||||
|
'./mysyde/common/cookie-bar/cookiebar-latest.js',
|
||||||
|
'./mysyde/common/common.js',
|
||||||
|
'./module/dcshop/common/dc_functions.js',
|
||||||
|
'./plugins/jQuery-actual/jquery.actual.min.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('components.js'))
|
||||||
|
.pipe(gulp.dest(builddir + '/js/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('scripts',function () {
|
||||||
|
return gulp.src([
|
||||||
|
builddir + '/js/components.js',
|
||||||
|
srcdir + '/js/script.js'
|
||||||
|
])
|
||||||
|
.pipe(concat('script.js'))
|
||||||
|
.pipe(gulp.dest(distdir + '/js/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('concat-css-components',function () {
|
||||||
|
return gulp.src([
|
||||||
|
bowerdir + '/mediaelement/build/mediaelementplayer.min.css',
|
||||||
|
bowerdir + '/normalize-css/normalize.css',
|
||||||
|
bowerdir + '/font-awesome/css/font-awesome.min.css',
|
||||||
|
bowerdir + '/material-design-icons/iconfont/material-icons.css',
|
||||||
|
builddir + '/css/bootstrap.css',
|
||||||
|
bowerdir + '/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css',
|
||||||
|
bowerdir + '/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css',
|
||||||
|
bowerdir + '/animate.css/animate.min.css',
|
||||||
|
bowerdir + '/owl.carousel/dist/assets/owl.carousel.min.css',
|
||||||
|
bowerdir + '/owl.carousel/dist/assets/owl.theme.default.min.css',
|
||||||
|
bowerdir + '/magicscroll/magicscroll.css',
|
||||||
|
bowerdir + '/password-strength-meter/dist/password.min.css',
|
||||||
|
bowerdir + '/magiczoomplus/magiczoomplus.css'
|
||||||
|
])
|
||||||
|
.pipe(concat('components.css')).on('error', onError)
|
||||||
|
.pipe(gulp.dest(builddir + '/css/'));
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('styles_dev', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
|
||||||
|
gulp.src(builddir + '/css/components.css')
|
||||||
|
.pipe(gulp.dest(distdir + '/css/')),
|
||||||
|
|
||||||
|
gulp.src(srcdir + "/less/app/style.less")
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(sourcemaps.write("."))
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
.pipe(concat('style.css')).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('styles_public', function() {
|
||||||
|
streamqueue({ objectMode: true},
|
||||||
|
gulp.src(builddir + '/css/components.css').on('error', onError),
|
||||||
|
gulp.src(srcdir + "/less/app/style.less")
|
||||||
|
.pipe(less())
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
.on('error', onError)
|
||||||
|
)
|
||||||
|
.pipe(concat('style.min.css')).on('error', onError)
|
||||||
|
.pipe(minifyCSS({compatibility: 'ie8'})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('autoprefixer',function () {
|
||||||
|
gulp.src(distdir + '/css/style.css')
|
||||||
|
.pipe(autoprefixer({
|
||||||
|
browsers: ['last 2 versions'],
|
||||||
|
cascade: false
|
||||||
|
})).on('error', onError)
|
||||||
|
.pipe(gulp.dest(distdir + '/css/'))
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default', function(callback) {
|
||||||
|
runSequence(
|
||||||
|
'clean-dist',
|
||||||
|
'bootstrap-less',
|
||||||
|
'bootstrap-js',
|
||||||
|
'concat-css-components',
|
||||||
|
'concat-js-components',
|
||||||
|
'generate-iconfont',
|
||||||
|
'styles_dev',
|
||||||
|
'autoprefixer',
|
||||||
|
'scripts',
|
||||||
|
'copy',
|
||||||
|
'watch',
|
||||||
|
callback);
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('public', function(callback) {
|
||||||
|
runSequence(
|
||||||
|
'clean-dist',
|
||||||
|
'bootstrap-less',
|
||||||
|
'bootstrap-js',
|
||||||
|
'concat-css-components',
|
||||||
|
'concat-js-components',
|
||||||
|
'generate-iconfont',
|
||||||
|
'styles_public',
|
||||||
|
'styles_fck',
|
||||||
|
'scripts',
|
||||||
|
'autoprefixer',
|
||||||
|
'uglify-js',
|
||||||
|
'copy',
|
||||||
|
'minify-images',
|
||||||
|
'generate-favicon',
|
||||||
|
callback);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onError(err) {
|
||||||
|
console.log(err);
|
||||||
|
this.emit('end');
|
||||||
|
}
|
||||||
5105
composer.lock
generated
Normal file
5105
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
93
layout/admin/css/fonts/sourcesanspro/LICENSE.txt
Normal file
93
layout/admin/css/fonts/sourcesanspro/LICENSE.txt
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
|
||||||
|
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
7041
layout/admin/css/mysyde.css
Normal file
7041
layout/admin/css/mysyde.css
Normal file
File diff suppressed because it is too large
Load Diff
811
layout/admin/css/responsive.css
Normal file
811
layout/admin/css/responsive.css
Normal file
@@ -0,0 +1,811 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
Media queries
|
||||||
|
========================================================================== */
|
||||||
|
.config.sitemap #content_3 ul.toolbar_menu {
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 #mainContent{
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 ul.toolbar_menu {
|
||||||
|
width: 20% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1750px) {
|
||||||
|
ul.toolbar_menu {
|
||||||
|
width: 260px!important;
|
||||||
|
}
|
||||||
|
/* ! Daschboard */
|
||||||
|
.dashboard_left {
|
||||||
|
width: 66%;
|
||||||
|
}
|
||||||
|
.dashboard_right {
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
.news-content-wrapper {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.news-content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.dashboard img.xml-img {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.dashboard img.hintergrund.teaser {
|
||||||
|
width: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
/* ! Daschboard Ende*/
|
||||||
|
.faq ul.toolbar_menu {
|
||||||
|
width: 25% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 1650px) {
|
||||||
|
.collections div#content #content_3.menu_opened #mainContent {
|
||||||
|
width: 70%!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 1550px) {
|
||||||
|
#header {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#header_menu {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content_3 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content {
|
||||||
|
padding: 60px 30px 30px 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_menu ul.site_dropdown {
|
||||||
|
left: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.dashoard_box {
|
||||||
|
width: 168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collections div#content #content_3.menu_opened #mainContent {
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.toolbar_menu {
|
||||||
|
width: 260px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.sites form#form_field_list {
|
||||||
|
width: 100%!important;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.module-card-list {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1500px) {
|
||||||
|
#nestable .changed_on,
|
||||||
|
#nestable .changed_by,
|
||||||
|
#nestable .dd-gaendert-am,
|
||||||
|
#nestable .dd-gaendert-von {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-gaendert-am {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.navigation .dd-code {
|
||||||
|
right: 254px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.navigation .dd-status {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-gaendert-von {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.changed_by {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.changed_on {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#overlaycrumb + ul.toolbar_menu {
|
||||||
|
width: 100%!Important;
|
||||||
|
padding: 0!important;
|
||||||
|
height: auto!important;
|
||||||
|
position: relative;
|
||||||
|
top: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-status {
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-code {
|
||||||
|
right: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mainContent .dd-handle .dd-icon {
|
||||||
|
right: 505px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 1250px) {
|
||||||
|
|
||||||
|
#content_3.menu_opened #mainContent {
|
||||||
|
height: auto;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.sites ul.toolbar_menu {
|
||||||
|
margin-top: 5rem!important;
|
||||||
|
}
|
||||||
|
#content-collection {
|
||||||
|
padding: 10px 30px 30px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content {
|
||||||
|
padding: 20px 30px 30px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.dashoard_box {
|
||||||
|
/* width: 40%; */
|
||||||
|
height: 137px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#header_menu {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_menu ul.site_dropdown {
|
||||||
|
width: 200px;
|
||||||
|
left: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#header-wrapper {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-wrapper {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-wrapper {
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
ul.toolbar_menu {
|
||||||
|
width: 80%!important;
|
||||||
|
z-index: 9;
|
||||||
|
height: auto!important;
|
||||||
|
position: unset;
|
||||||
|
margin: 0 0 1rem!important;
|
||||||
|
float: left!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure div#content #content_3.menu_opened #mainContent {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar_menu li.promoted {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collections div#content #content_3.menu_opened #mainContent {
|
||||||
|
width: 96%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-wrapper {
|
||||||
|
right: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_menu:nth-child(2) {
|
||||||
|
bottom: 100px;
|
||||||
|
}
|
||||||
|
/* ! Daschboard */
|
||||||
|
.dashboard_left {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.dashboard_right {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.news-content {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.dashboard img.xml-img {
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.news-content-wrapper {
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
/* ! Daschboard Ende*/
|
||||||
|
|
||||||
|
#content_3.menu_opened {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
#content_3.menu_opened #mainContent {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
ul.toolbar_menu {
|
||||||
|
width: 100% !Important;
|
||||||
|
padding: 20px 30px !Important;
|
||||||
|
/* margin: 0 !important; */
|
||||||
|
}
|
||||||
|
#content_3.menu_opened .toolbar_menu li.promoted {
|
||||||
|
padding-bottom: unset;
|
||||||
|
}
|
||||||
|
.collections div#content #content_3.menu_opened #mainContent {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
.collections #content_3 .toolbar_menu {
|
||||||
|
width: 100% !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.collections #content_3 .toolbar_menu ul{
|
||||||
|
margin-top: unset;
|
||||||
|
}
|
||||||
|
.collections #content_3 li.not_promoted {
|
||||||
|
margin-bottom: unset;
|
||||||
|
margin-top: unset;
|
||||||
|
}
|
||||||
|
.faq ul.toolbar_menu {
|
||||||
|
width: 100% !important;
|
||||||
|
margin-bottom: 20px !important;
|
||||||
|
}
|
||||||
|
.faq form#form_faq_cardform {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.faq .toolbar_menu li.promoted {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
#overlayContent form {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 ul.toolbar_menu {
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 .toolbar_menu li.promoted{
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 #mainContent{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.config.sitemap #content_3 ul.toolbar_menu {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
.faq.faq_main div#mainContent {
|
||||||
|
width: 100% !important;
|
||||||
|
max-width: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
|
#login {
|
||||||
|
position: relative;
|
||||||
|
top: unset;
|
||||||
|
left: unset;
|
||||||
|
transform: none;
|
||||||
|
width: auto;
|
||||||
|
background-color: var(--toggle-bg-color);
|
||||||
|
box-shadow: none;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login_1 {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
form#form_admin_login {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrapper {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 20px;
|
||||||
|
width: 100%;
|
||||||
|
padding-block-start: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-animation {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li a, nav ul li a:link, nav ul li a:visited, nav ul li a:active {
|
||||||
|
color: var(--fc-color-white-always);
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.navigation form#form_edit_main_navigation_card td {
|
||||||
|
width: 100%!Important;
|
||||||
|
float: left;
|
||||||
|
padding-right: 0!important;
|
||||||
|
}
|
||||||
|
div#header-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li#user_menu ul,
|
||||||
|
li#settings_menu ul {
|
||||||
|
position: relative;
|
||||||
|
right: 0;
|
||||||
|
bottom: unset!Important;
|
||||||
|
top: unset;
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-wrapper {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li#help_menu:hover:after, li#settings_menu:hover:after, li#user_menu:hover:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-wrapper li:hover a {
|
||||||
|
background-color: transparent!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.site_dropdown li {
|
||||||
|
background: transparent!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
li#site_language_menu {
|
||||||
|
color: var(--fc-color-white-always);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-code {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-status {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-layout {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.sites form#form_field_list {
|
||||||
|
padding: 0!Important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure input#input_description {
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure table.cardform td {
|
||||||
|
width: 100%!important;
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure table.cardform td {
|
||||||
|
width: 100%!important;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure table.cardform td:first-child {
|
||||||
|
width: 100%!important;
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.navigation form#form_edit_main_navigation_card {
|
||||||
|
border: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 100%;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
border-bottom: 1px solid var(--rahmen);
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#header_menu {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
position: relative;
|
||||||
|
top: unset;
|
||||||
|
padding-block-start: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_menu:nth-child(2) {
|
||||||
|
width: 100%;
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_menu:nth-child(2) {
|
||||||
|
position: relative;
|
||||||
|
bottom: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-wrapper {
|
||||||
|
right: unset;
|
||||||
|
position: relative;
|
||||||
|
right: unset;
|
||||||
|
display: block;
|
||||||
|
height: auto;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li a, nav ul li a:link, nav ul li a:visited, nav ul li a:active {
|
||||||
|
padding: 5px 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li#site_language_menu {
|
||||||
|
width: 100%;
|
||||||
|
padding: 5px 23px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content {
|
||||||
|
padding: 20px!important;
|
||||||
|
margin-block-start: 60px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#mainContent {
|
||||||
|
padding: 0rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-padding {
|
||||||
|
padding: 15px 0;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content_3 {
|
||||||
|
padding: 0;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard #mainContent {
|
||||||
|
width: 100%!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-toggle {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo a {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.show {
|
||||||
|
background: var(--mysyde);
|
||||||
|
}
|
||||||
|
|
||||||
|
#content_3.menu_opened #mainContent {
|
||||||
|
padding: 10px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#form_contactform_list_table_length {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#form_contactform_list_table_filter label {
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overlaycrumb {
|
||||||
|
font-size: 23px;
|
||||||
|
border: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eight.wide.column {
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar_menu li.promoted {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.cardform td {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config.config_collections form#form_collection_cardform {
|
||||||
|
padding-block: 2rem;
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config.config_collections form#form_line_list, .config.config_collections form#form_group_line_list, .config.config_collections form#form_collection_choose_cardform {
|
||||||
|
float: left;
|
||||||
|
border-right: 0;
|
||||||
|
height: auto;
|
||||||
|
padding-block-end: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config.config_collections div.input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.config.config_users form#form_admin_user_card td {
|
||||||
|
width: 100%!important;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.components table.cardform td:first-child {
|
||||||
|
width: 100%!important;
|
||||||
|
padding-right: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
form#form_layout_area_card td {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config.config_websites form#form_site_card, .config_users form#form_admin_user_card, #bewerber_forms {
|
||||||
|
width: 100%;
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
form#form_layout_card td {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.collections div#content #content_3.menu_opened #mainContent {
|
||||||
|
width: 100% !important;
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure.sites ul.toolbar_menu {
|
||||||
|
margin-top: 1rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config.config_collections form#form_collection_cardform td {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.code {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.status {
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dd-code {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.collections div#content_3 {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#form_collection_list_table_length {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content h3 {
|
||||||
|
font-size: 14px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.toolbar_menu {
|
||||||
|
width: 100% !Important;
|
||||||
|
padding: 0!important;
|
||||||
|
gap: .5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collections #content_3 .toolbar_menu {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0!important;
|
||||||
|
margin-top: 1rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content_3.menu_opened .toolbar_menu li.promoted {
|
||||||
|
width: 100%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-content {
|
||||||
|
width: 100%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.teaser {
|
||||||
|
height: 290px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-content-wrapper {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eight.wide.column {
|
||||||
|
display: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-50 {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
div.dataTables_wrapper div.dataTables_filter span.input {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#form_collection_list_table_filter label {
|
||||||
|
text-align: left;
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dataTables_wrapper div.dataTables_filter span.input,
|
||||||
|
span.ui.input {
|
||||||
|
margin-left: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection_field {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
input#input_description {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collections #overlaycrumb .input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overlayContent form {
|
||||||
|
border: none;
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-main-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
form#form_line_card td {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab ul.toolbar_menu, form#form_field_list .toolbar_menu {
|
||||||
|
padding: 0!important;
|
||||||
|
margin: 0!important;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.structure .toolbar_menu li.promoted {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content {
|
||||||
|
padding: 10px!important;
|
||||||
|
margin-block-start: 70px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead tr {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.text.sorting {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.linklist tr td div {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.stackable.pagination.menu {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#form_collection_list_table_previous {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#form_collection_list_table_next {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content-collection {
|
||||||
|
padding: 10px!Important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-main-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right.aligned.eight.wide.column {
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#overlayWrapper {
|
||||||
|
padding: 10px;
|
||||||
|
float: left;
|
||||||
|
margin: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-wrapper {
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content_3.menu_opened #mainContent {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sixteen.wide.column {
|
||||||
|
padding: 0!important;
|
||||||
|
border: none!Important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content h1 {
|
||||||
|
font-size: 20px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.cardform td {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard .dashboard-left-content {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
layout/admin/js/bc.backend.js
Normal file
16
layout/admin/js/bc.backend.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
//Inaktive Rot markieren
|
||||||
|
$('.dd-status:contains("Inaktiv")').parent().addClass("inactiveSitecontent");
|
||||||
|
|
||||||
|
//Toolbar in den Sitecontent bringen
|
||||||
|
$( "ul.toolbar_menu.collection" ).appendTo( $( ".site-content" ) );
|
||||||
|
|
||||||
|
//Wrapped Sidepart
|
||||||
|
$( "ul.toolbar_menu.collection, .collection_form.collection" ).wrapAll( "<div class='site-part' />");
|
||||||
|
|
||||||
|
$( "#content-collection" ).insertBefore( ".site" );
|
||||||
|
|
||||||
|
$( ".toolbar_menu , form#form_inhalte " ).wrapAll( "<div class='collection-site-wrapper' />");
|
||||||
|
|
||||||
|
|
||||||
90
layout/frontend/b2c/ck_styles.js
Normal file
90
layout/frontend/b2c/ck_styles.js
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||||
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
CKEDITOR.stylesSet.add( 'my_styles',
|
||||||
|
[
|
||||||
|
/* Block Styles */
|
||||||
|
|
||||||
|
// These styles are already available in the "Format" combo, so they are
|
||||||
|
// not needed here by default. You may enable them to avoid placing the
|
||||||
|
// "Format" combo in the toolbar, maintaining the same features.
|
||||||
|
|
||||||
|
{ name : 'Paragraph' , element : 'p' },
|
||||||
|
|
||||||
|
{ name : 'Heading 1' , element : 'h1' },
|
||||||
|
{ name : 'Heading 2' , element : 'h2' },
|
||||||
|
{ name : 'Heading 3' , element : 'h3' },
|
||||||
|
{ name : 'Heading 4' , element : 'h4' },
|
||||||
|
{ name : 'Heading 5' , element : 'h5' },
|
||||||
|
{ name : 'Heading 6' , element : 'h6' },
|
||||||
|
/*{ name : 'Preformatted Text', element : 'pre' },
|
||||||
|
{ name : 'Address' , element : 'address' },
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
{ name : 'Green Title' , element : 'h3', styles : { 'color' : 'Green' } },
|
||||||
|
{ name : 'Blue Title' , element : 'h3', styles : { 'color' : 'Blue' } },
|
||||||
|
{ name : 'Red Title' , element : 'h3', styles : { 'color' : 'Red' } },
|
||||||
|
*/
|
||||||
|
/* Inline Styles */
|
||||||
|
|
||||||
|
// These are core styles available as toolbar buttons. You may opt enabling
|
||||||
|
// some of them in the Styles combo, removing them from the toolbar.
|
||||||
|
/*
|
||||||
|
{ name : 'Strong' , element : 'strong', overrides : 'b' },
|
||||||
|
{ name : 'Emphasis' , element : 'em' , overrides : 'i' },
|
||||||
|
{ name : 'Underline' , element : 'u' },
|
||||||
|
{ name : 'Strikethrough' , element : 'strike' },
|
||||||
|
{ name : 'Subscript' , element : 'sub' },
|
||||||
|
{ name : 'Superscript' , element : 'sup' },
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*{ name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } },
|
||||||
|
{ name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } },
|
||||||
|
|
||||||
|
{ name : 'Big' , element : 'big' },
|
||||||
|
{ name : 'Small' , element : 'small' },
|
||||||
|
{ name : 'Typewriter' , element : 'tt' },
|
||||||
|
|
||||||
|
{ name : 'Computer Code' , element : 'code' },
|
||||||
|
{ name : 'Keyboard Phrase' , element : 'kbd' },
|
||||||
|
{ name : 'Sample Text' , element : 'samp' },
|
||||||
|
{ name : 'Variable' , element : 'var' },
|
||||||
|
|
||||||
|
{ name : 'Deleted Text' , element : 'del' },
|
||||||
|
{ name : 'Inserted Text' , element : 'ins' },
|
||||||
|
|
||||||
|
{ name : 'Cited Work' , element : 'cite' },
|
||||||
|
{ name : 'Inline Quotation' , element : 'q' },
|
||||||
|
|
||||||
|
{ name : 'Language: RTL' , element : 'span', attributes : { 'dir' : 'rtl' } },
|
||||||
|
{ name : 'Language: LTR' , element : 'span', attributes : { 'dir' : 'ltr' } },
|
||||||
|
*/
|
||||||
|
/* Object Styles */
|
||||||
|
|
||||||
|
{
|
||||||
|
name : 'Image on Left',
|
||||||
|
element : 'img',
|
||||||
|
attributes :
|
||||||
|
{
|
||||||
|
'style' : 'padding: 5px; margin-right: 5px',
|
||||||
|
'border' : '2',
|
||||||
|
'align' : 'left'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name : 'Image on Right',
|
||||||
|
element : 'img',
|
||||||
|
attributes :
|
||||||
|
{
|
||||||
|
'style' : 'padding: 5px; margin-left: 5px',
|
||||||
|
'border' : '2',
|
||||||
|
'align' : 'right'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ name : 'Borderless Table', element : 'table', styles: { 'border-style': 'hidden', 'background-color' : '#E6E6FA' } },
|
||||||
|
{ name : 'Square Bulleted List', element : 'ul', styles : { 'list-style-type' : 'square' } }
|
||||||
|
]);
|
||||||
11621
layout/frontend/b2c/dist/css/global.css
vendored
Normal file
11621
layout/frontend/b2c/dist/css/global.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
layout/frontend/b2c/dist/favicons/browserconfig.xml
vendored
Normal file
9
layout/frontend/b2c/dist/favicons/browserconfig.xml
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/mstile-150x150.png"/>
|
||||||
|
<TileColor>#da532c</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
||||||
19
layout/frontend/b2c/dist/favicons/site.webmanifest
vendored
Normal file
19
layout/frontend/b2c/dist/favicons/site.webmanifest
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"short_name": "",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
||||||
1609
layout/frontend/b2c/dist/fontawesome/css/brands.css
vendored
Normal file
1609
layout/frontend/b2c/dist/fontawesome/css/brands.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8205
layout/frontend/b2c/dist/fontawesome/css/fontawesome.css
vendored
Normal file
8205
layout/frontend/b2c/dist/fontawesome/css/fontawesome.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19
layout/frontend/b2c/dist/fontawesome/css/solid.css
vendored
Normal file
19
layout/frontend/b2c/dist/fontawesome/css/solid.css
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||||
|
* Copyright 2024 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Free';
|
||||||
|
--fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Free';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.fas,
|
||||||
|
.fa-solid {
|
||||||
|
font-weight: 900; }
|
||||||
5635
layout/frontend/b2c/dist/js/all.js
vendored
Normal file
5635
layout/frontend/b2c/dist/js/all.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1076
layout/frontend/b2c/dist/js/bc.min.js
vendored
Normal file
1076
layout/frontend/b2c/dist/js/bc.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
layout/frontend/b2c/dist/js/fonta.js
vendored
Normal file
2
layout/frontend/b2c/dist/js/fonta.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
layout/frontend/b2c/dist/js/script.js
vendored
Normal file
18
layout/frontend/b2c/dist/js/script.js
vendored
Normal file
File diff suppressed because one or more lines are too long
67
layout/frontend/intranet/dist/css/fck.css
vendored
Normal file
67
layout/frontend/intranet/dist/css/fck.css
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
:root {
|
||||||
|
--font-family: 'Figtree', 'Source Sans Pro', sans-serif!important;
|
||||||
|
--rahmen: #eceff2;
|
||||||
|
|
||||||
|
}
|
||||||
|
html[data-theme='light'] {
|
||||||
|
--rahmen: #eceff2;
|
||||||
|
--inactive: #f97a7a47;
|
||||||
|
--invert: invert(0);
|
||||||
|
--mysyde: #244858;
|
||||||
|
--mysyde-dark: #244858;
|
||||||
|
--mysyde-accent: #16629b;
|
||||||
|
--toggle-fc-color: #fff;
|
||||||
|
--fc-color-dark-always: #161616;
|
||||||
|
--fc-color-white-always: #fff;
|
||||||
|
--toggle-fc-color-dark: #161616;
|
||||||
|
--toggle-bg-color: #fff;
|
||||||
|
--toggle-bg-color-light: #fff;
|
||||||
|
--toggle-bg-color-2: #f5f7fb;
|
||||||
|
--fc-light: #A7B5BC;
|
||||||
|
--brightness: unset;
|
||||||
|
--fc-light-header: #161616;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] {
|
||||||
|
--rahmen: #2e4256;
|
||||||
|
--invert: invert(1);
|
||||||
|
--inactive: #492828;
|
||||||
|
--mysyde: #244858;
|
||||||
|
--mysyde-dark: #0c222b;
|
||||||
|
--mysyde-accent: #16629b;
|
||||||
|
--brightness: brightness(10);
|
||||||
|
--toggle-fc-color: #fff;
|
||||||
|
--fc-color-dark-always: #161616;
|
||||||
|
--fc-color-white-always: #fff;
|
||||||
|
--toggle-fc-color-dark: #ffffff;
|
||||||
|
--toggle-bg-color: #0c222b;
|
||||||
|
--toggle-bg-color-light: #12323f;
|
||||||
|
--toggle-bg-color-2: #0c222b;
|
||||||
|
--fc-light: #ffffff;
|
||||||
|
--fc-light-header: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='random'] {
|
||||||
|
--rahmen: #cc4713;
|
||||||
|
--invert: invert(1);
|
||||||
|
--inactive: #492828;
|
||||||
|
--mysyde: #4c2458;
|
||||||
|
--mysyde-dark: #1d0c2b;
|
||||||
|
--mysyde-accent: #6a169b;
|
||||||
|
--brightness: brightness(10);
|
||||||
|
--toggle-fc-color: rgb(255, 255, 255);
|
||||||
|
--fc-color-dark-always: #b84040;
|
||||||
|
--fc-color-white-always: #fff;
|
||||||
|
--toggle-fc-color-dark: #ffffff;
|
||||||
|
--toggle-bg-color: #2d92b9;
|
||||||
|
--toggle-bg-color-light: #56d819;
|
||||||
|
--toggle-bg-color-2: #0c222b;
|
||||||
|
--fc-light: #ffffff;
|
||||||
|
--fc-light-header: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: var(--toggle-fc-color-dark)!important;
|
||||||
|
font-family: var(--font-family);
|
||||||
|
}
|
||||||
4
module/api/.htaccess
Normal file
4
module/api/.htaccess
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<Files "notifications-c5c54-a9705bfea23c.json">
|
||||||
|
Order allow,deny
|
||||||
|
Deny from all
|
||||||
|
</Files>
|
||||||
3
module/api/app_api_domain.php
Normal file
3
module/api/app_api_domain.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
echo "true";
|
||||||
|
?>
|
||||||
0
module/api/cronjob_send_custom_notif.inc.php
Normal file
0
module/api/cronjob_send_custom_notif.inc.php
Normal file
242
module/api/cronjob_send_custom_notif.php
Normal file
242
module/api/cronjob_send_custom_notif.php
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
<?php
|
||||||
|
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
|
function getAccessToken($jsonKeyPath)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$jwt = generateJWT($jsonKeyPath);
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, 'https://oauth2.googleapis.com/token');
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
|
||||||
|
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
|
||||||
|
'assertion' => $jwt,
|
||||||
|
]));
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||||
|
'Content-Type: application/x-www-form-urlencoded',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
$jsonResponse = json_decode($response, true);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
echo $th;
|
||||||
|
}
|
||||||
|
return $jsonResponse['access_token'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateJWT($jsonKeyPath)
|
||||||
|
{
|
||||||
|
$jsonKey = json_decode(file_get_contents($jsonKeyPath), true);
|
||||||
|
|
||||||
|
$header = base64_encode(json_encode([
|
||||||
|
'alg' => 'RS256',
|
||||||
|
'typ' => 'JWT',
|
||||||
|
]));
|
||||||
|
|
||||||
|
$iat = time();
|
||||||
|
$exp = $iat + 3600; // 1 час
|
||||||
|
$claimSet = base64_encode(json_encode([
|
||||||
|
'iss' => $jsonKey['client_email'],
|
||||||
|
'scope' => 'https://www.googleapis.com/auth/firebase.messaging',
|
||||||
|
'aud' => 'https://oauth2.googleapis.com/token',
|
||||||
|
'exp' => $exp,
|
||||||
|
'iat' => $iat,
|
||||||
|
]));
|
||||||
|
|
||||||
|
$signatureInput = $header . '.' . $claimSet;
|
||||||
|
|
||||||
|
openssl_sign($signatureInput, $signature, openssl_pkey_get_private($jsonKey['private_key']), 'sha256');
|
||||||
|
$signature = base64_encode($signature);
|
||||||
|
|
||||||
|
return $signatureInput . '.' . $signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
function send($token, $username, $message)
|
||||||
|
{
|
||||||
|
// $jsonKeyPath = '../../notifications-c5c54-a9705bfea23c.json';
|
||||||
|
$jsonKeyPath = 'secrets/notifications-c5c54-a9705bfea23c.json';
|
||||||
|
$accessToken = getAccessToken($jsonKeyPath);
|
||||||
|
|
||||||
|
$json = json_encode([
|
||||||
|
"message" => [
|
||||||
|
"token" => $token,
|
||||||
|
"notification" => [
|
||||||
|
"title" => $username,
|
||||||
|
"body" => $message
|
||||||
|
],
|
||||||
|
"data" => [
|
||||||
|
"story_id" => "story_12345",
|
||||||
|
"badgeIncrement" => "1"
|
||||||
|
],
|
||||||
|
"apns" => [
|
||||||
|
"payload" => [
|
||||||
|
"aps" => [
|
||||||
|
"content-available" => 1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
|
$url = "https://fcm.googleapis.com/v1/projects/notifications-c5c54/messages:send";
|
||||||
|
|
||||||
|
$ch = curl_init($url);
|
||||||
|
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Authorization: Bearer ' . $accessToken,
|
||||||
|
'Content-Type: application/json; charset=UTF-8',
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
|
||||||
|
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$env = parse_ini_file('/var/www/web10/htdocs/intranet/config/.env');
|
||||||
|
|
||||||
|
$db_host = $env['MAIN_MYSQL_DB_HOST'];
|
||||||
|
$db_port = $env['MAIN_MYSQL_DB_PORT'];
|
||||||
|
$db_user = $env['MAIN_MYSQL_DB_USER'];
|
||||||
|
$db_pass = $env['MAIN_MYSQL_DB_PASS'];
|
||||||
|
$db_schema = $env['MAIN_MYSQL_DB_SCHEMA'];
|
||||||
|
|
||||||
|
$conn = new mysqli($db_host, $db_user, $db_pass, $db_schema, $db_port);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Format current date to match the validity_from format (YYYY-MM-DD)
|
||||||
|
$currDate = date('Y-m-d');
|
||||||
|
|
||||||
|
// Query to get all collections where validity_from matches today's date
|
||||||
|
$query_get_all_current_collections = "SELECT * FROM main_collection WHERE delayed_notification = 1 AND validity_from = '$currDate'";
|
||||||
|
$result_collections = $conn->query($query_get_all_current_collections);
|
||||||
|
|
||||||
|
if ($result_collections->num_rows > 0) {
|
||||||
|
// Loop through each collection
|
||||||
|
while ($row = $result_collections->fetch_assoc()) {
|
||||||
|
|
||||||
|
print_r($row["description"]);
|
||||||
|
print_r($row["id"]);
|
||||||
|
$article_name = $row["description"];
|
||||||
|
|
||||||
|
|
||||||
|
echo "<br>--------------------<br>";
|
||||||
|
|
||||||
|
$department_ids = [];
|
||||||
|
$role_ids = [];
|
||||||
|
|
||||||
|
$query_get_department = "SELECT * FROM intranet_teil_link WHERE content_type = 'collection' AND content_id = " . $row['id'];
|
||||||
|
$result_department = $conn->query($query_get_department);
|
||||||
|
|
||||||
|
while ($row_department = $result_department->fetch_assoc()) {
|
||||||
|
$department_ids[] = $row_department['main_department_id'];
|
||||||
|
var_dump($row_department);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<br>--------------------<br>";
|
||||||
|
|
||||||
|
$query_get_role = "SELECT * FROM intranet_role_link WHERE content_type = 'collection' AND content_id = " . $row['id'];
|
||||||
|
$result_role = $conn->query($query_get_role);
|
||||||
|
|
||||||
|
while ($row_role = $result_role->fetch_assoc()) {
|
||||||
|
$role_ids[] = $row_role['main_role_id'];
|
||||||
|
var_dump($row_role);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create comma-separated strings
|
||||||
|
$abteilung = implode(',', $department_ids);
|
||||||
|
$role = implode(',', $role_ids);
|
||||||
|
|
||||||
|
$abteilungArray = explode(',', $abteilung);
|
||||||
|
$roleArray = explode(',', $role);
|
||||||
|
|
||||||
|
$mergedArray = [];
|
||||||
|
|
||||||
|
foreach ($abteilungArray as $abteilung) {
|
||||||
|
foreach ($roleArray as $role) {
|
||||||
|
$mergedArray[] = [
|
||||||
|
'abteilung' => $abteilung,
|
||||||
|
'role' => $role
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$tokenArray = [];
|
||||||
|
// print_r($mergedArray);
|
||||||
|
// print_r($abteilungArray);
|
||||||
|
// print_r($roleArray);
|
||||||
|
var_dump($mergedArray);
|
||||||
|
foreach ($mergedArray as $element) {
|
||||||
|
|
||||||
|
if ($element['abteilung'] == "" && $element['role'] == "") {
|
||||||
|
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1";
|
||||||
|
} else if ($element['abteilung'] == "") {
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_role_id = " . $element['role'];
|
||||||
|
} else if ($element['role'] == "") {
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_department_id = " . $element['abteilung'];
|
||||||
|
} else {
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_department_id = " . $element['abteilung'] . " and main_role_id = " . $element['role'];
|
||||||
|
}
|
||||||
|
// var_dump($sql);
|
||||||
|
var_dump($sql);
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$query = "SELECT DISTINCT main_contact.id, main_contact.name, token_contact.token as 'token' FROM main_contact LEFT JOIN token_contact ON token_contact.contact_id = main_contact.id WHERE main_contact.id = '" . $row['main_contact_id'] . "'";
|
||||||
|
// var_dump($query);
|
||||||
|
$user_result = $conn->query($query);
|
||||||
|
if ($user_result->num_rows > 0) {
|
||||||
|
while ($contact = $user_result->fetch_assoc()) {
|
||||||
|
if ($contact['token'] != null && $contact['token'] != "") {
|
||||||
|
// send($contact['token'], "Intranet", "Neuer Beitrag im Intranet");
|
||||||
|
$contact_info = [
|
||||||
|
'id' => $contact['id'],
|
||||||
|
'name' => $contact['name'],
|
||||||
|
'token' => $contact['token']
|
||||||
|
];
|
||||||
|
if (!in_array($contact_info, $tokenArray, true)) {
|
||||||
|
$tokenArray[] = $contact_info;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// echo "Already in array";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// var_dump($tokenArray);
|
||||||
|
// foreach ($tokenArray as $token) {
|
||||||
|
// // print("würde gesendet: <br>");
|
||||||
|
// send($token['token'], "Neuer Beitrag im Intranet", $article_name);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "No collections found for today.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "INSERT INTO cron_jobs (name) VALUES ('send_custom_notif')";
|
||||||
|
$result = $conn->query($query);
|
||||||
|
|
||||||
|
|
||||||
25
module/api/getUser.php
Normal file
25
module/api/getUser.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
$userLogin = $_POST['login_api_phone'];
|
||||||
|
$userPassword = $_POST['password_api_phone'];
|
||||||
|
$password = md5($userPassword);
|
||||||
|
|
||||||
|
// echo $userLogin." ".$password;
|
||||||
|
|
||||||
|
$pdo = new PDO('mysql:host=localhost;dbname=web4_intranet;charset=utf8', "web4_intranet", "WewJedjuAbEynk3");
|
||||||
|
$GLOBALS["pdo_conn"] = $pdo;
|
||||||
|
|
||||||
|
$noPublish = "SELECT main_contact_id AS contact_id FROM main_contact_department INNER JOIN main_contact ON main_contact_department.main_contact_id=main_contact.id WHERE main_contact.shortcut='$userLogin' AND main_contact.password='$password'";
|
||||||
|
|
||||||
|
|
||||||
|
$stmt = $pdo->prepare($noPublish);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
// $pp = md5($userPassword);
|
||||||
|
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
if ($row) {
|
||||||
|
echo $row["contact_id"];
|
||||||
|
}else {
|
||||||
|
echo "null";
|
||||||
|
}
|
||||||
|
?>
|
||||||
3
module/api/isShowEvent.php
Normal file
3
module/api/isShowEvent.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
||||||
14
module/api/out_system.inc.php
Normal file
14
module/api/out_system.inc.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
$user = $_POST['user'];
|
||||||
|
|
||||||
|
$pdo = new PDO('mysql:host=localhost;dbname=web4_intranet;charset=utf8', "web4_intranet", "WewJedjuAbEynk3");
|
||||||
|
$GLOBALS["pdo_conn"] = $pdo;
|
||||||
|
|
||||||
|
$noPublish = "UPDATE token_contact SET token_contact.in_system=0 WHERE token_contact.contact_id=$user";
|
||||||
|
|
||||||
|
$stmt = $pdo->prepare($noPublish);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
$count = $stmt->fetchColumn();
|
||||||
|
|
||||||
|
?>
|
||||||
16
module/api/sendTokenToDB.php
Normal file
16
module/api/sendTokenToDB.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
$token = $_POST['token'];
|
||||||
|
$user = $_POST['user'];
|
||||||
|
$domain = $_POST['domain'];
|
||||||
|
|
||||||
|
$pdo = new PDO('mysql:host=localhost;dbname=web4_intranet;charset=utf8', "web4_intranet", "WewJedjuAbEynk3");
|
||||||
|
$GLOBALS["pdo_conn"] = $pdo;
|
||||||
|
|
||||||
|
$noPublish = "CALL insertToken('$token', '$user')";
|
||||||
|
|
||||||
|
$stmt = $pdo->prepare($noPublish);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
$count = $stmt->fetchColumn();
|
||||||
|
|
||||||
|
?>
|
||||||
228
module/api/send_custom_notif.inc.php
Normal file
228
module/api/send_custom_notif.inc.php
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
<?php
|
||||||
|
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
|
$user = $_POST['user'];
|
||||||
|
$title = $_POST['title'];
|
||||||
|
$body = $_POST['body'];
|
||||||
|
$abteilung = $_POST['abteilung'];
|
||||||
|
$role = $_POST['role'];
|
||||||
|
$domain = $_POST['domain'];
|
||||||
|
$input_collection_id = $_POST['input_collection_id'];
|
||||||
|
|
||||||
|
|
||||||
|
function getAccessToken($jsonKeyPath)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$jwt = generateJWT($jsonKeyPath);
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, 'https://oauth2.googleapis.com/token');
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
|
||||||
|
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
|
||||||
|
'assertion' => $jwt,
|
||||||
|
]));
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||||
|
'Content-Type: application/x-www-form-urlencoded',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
$jsonResponse = json_decode($response, true);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
echo $th;
|
||||||
|
}
|
||||||
|
return $jsonResponse['access_token'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateJWT($jsonKeyPath)
|
||||||
|
{
|
||||||
|
$jsonKey = json_decode(file_get_contents($jsonKeyPath), true);
|
||||||
|
|
||||||
|
$header = base64_encode(json_encode([
|
||||||
|
'alg' => 'RS256',
|
||||||
|
'typ' => 'JWT',
|
||||||
|
]));
|
||||||
|
|
||||||
|
$iat = time();
|
||||||
|
$exp = $iat + 3600; // 1 час
|
||||||
|
$claimSet = base64_encode(json_encode([
|
||||||
|
'iss' => $jsonKey['client_email'],
|
||||||
|
'scope' => 'https://www.googleapis.com/auth/firebase.messaging',
|
||||||
|
'aud' => 'https://oauth2.googleapis.com/token',
|
||||||
|
'exp' => $exp,
|
||||||
|
'iat' => $iat,
|
||||||
|
]));
|
||||||
|
|
||||||
|
$signatureInput = $header . '.' . $claimSet;
|
||||||
|
|
||||||
|
openssl_sign($signatureInput, $signature, openssl_pkey_get_private($jsonKey['private_key']), 'sha256');
|
||||||
|
$signature = base64_encode($signature);
|
||||||
|
|
||||||
|
return $signatureInput . '.' . $signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
function send($token, $username, $message)
|
||||||
|
{
|
||||||
|
// $jsonKeyPath = '../../notifications-c5c54-a9705bfea23c.json';
|
||||||
|
$jsonKeyPath = 'secrets/notifications-c5c54-a9705bfea23c.json';
|
||||||
|
$accessToken = getAccessToken($jsonKeyPath);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
{
|
||||||
|
"message": {
|
||||||
|
"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJzaG9ydGN1dCI6ImVhIn0.mcO9WT0VV_lXJp48mu3XF9E9bKEdCitoKogAk067LwQ",
|
||||||
|
"notification": {
|
||||||
|
"title": "Breaking News",
|
||||||
|
"body": "New news story available."
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"story_id": "story_12345"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$json = json_encode([
|
||||||
|
"message" => [
|
||||||
|
"token" => $token,
|
||||||
|
"notification" => [
|
||||||
|
"title" => $username,
|
||||||
|
"body" => $message
|
||||||
|
],
|
||||||
|
"data" => [
|
||||||
|
"story_id" => "story_12345",
|
||||||
|
"badgeIncrement" => "1"
|
||||||
|
],
|
||||||
|
"apns" => [
|
||||||
|
"payload" => [
|
||||||
|
"aps" => [
|
||||||
|
"content-available" => 1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$url = "https://fcm.googleapis.com/v1/projects/notifications-c5c54/messages:send";
|
||||||
|
|
||||||
|
|
||||||
|
$ch = curl_init($url);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Authorization: Bearer ' . $accessToken,
|
||||||
|
'Content-Type: application/json; charset=UTF-8',
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
|
||||||
|
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$env = parse_ini_file('../../config/.env');
|
||||||
|
|
||||||
|
$db_host = $env['MAIN_MYSQL_DB_HOST'];
|
||||||
|
$db_port = $env['MAIN_MYSQL_DB_PORT'];
|
||||||
|
$db_user = $env['MAIN_MYSQL_DB_USER'];
|
||||||
|
$db_pass = $env['MAIN_MYSQL_DB_PASS'];
|
||||||
|
$db_schema = $env['MAIN_MYSQL_DB_SCHEMA'];
|
||||||
|
|
||||||
|
$conn = new mysqli($db_host, $db_user, $db_pass, $db_schema, $db_port);
|
||||||
|
|
||||||
|
$abteilungArray = explode(',', $abteilung);
|
||||||
|
$roleArray = explode(',', $role);
|
||||||
|
|
||||||
|
$mergedArray = [];
|
||||||
|
|
||||||
|
foreach ($abteilungArray as $abteilung) {
|
||||||
|
foreach ($roleArray as $role) {
|
||||||
|
$mergedArray[] = [
|
||||||
|
'abteilung' => $abteilung,
|
||||||
|
'role' => $role
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$query_collection_name = "SELECT * FROM main_collection WHERE id = " . $input_collection_id;
|
||||||
|
$result = $conn->query($query_collection_name);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
$collection_name = $row['description'];
|
||||||
|
} else {
|
||||||
|
echo "collection not found";
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$tokenArray = [];
|
||||||
|
// print_r($mergedArray);
|
||||||
|
// print_r($abteilungArray);
|
||||||
|
// print_r($roleArray);
|
||||||
|
foreach ($mergedArray as $element) {
|
||||||
|
// $sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_department_id = " . $element['abteilung'] . " and main_role_id = " . $element['role'];
|
||||||
|
// var_dump($sql);
|
||||||
|
if ($element['abteilung'] == "" && $element['role'] == "") {
|
||||||
|
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1";
|
||||||
|
} else if ($element['abteilung'] == "") {
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_role_id = " . $element['role'];
|
||||||
|
} else if ($element['role'] == "") {
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_department_id = " . $element['abteilung'];
|
||||||
|
} else {
|
||||||
|
$sql = "SELECT DISTINCT main_contact_id FROM main_contact_department WHERE main_mandant_id = 1 AND active = 1 and main_department_id = " . $element['abteilung'] . " and main_role_id = " . $element['role'];
|
||||||
|
}
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$query = "SELECT DISTINCT main_contact.id, main_contact.name, token_contact.token as 'token' FROM main_contact LEFT JOIN token_contact ON token_contact.contact_id = main_contact.id WHERE main_contact.id = '" . $row['main_contact_id'] . "'";
|
||||||
|
// var_dump($query);
|
||||||
|
$user_result = $conn->query($query);
|
||||||
|
if ($user_result->num_rows > 0) {
|
||||||
|
while ($contact = $user_result->fetch_assoc()) {
|
||||||
|
if ($contact['token'] != null && $contact['token'] != "") {
|
||||||
|
// send($contact['token'], "Intranet", "Neuer Beitrag im Intranet");
|
||||||
|
$contact_info = [
|
||||||
|
'id' => $contact['id'],
|
||||||
|
'name' => $contact['name'],
|
||||||
|
'token' => $contact['token']
|
||||||
|
];
|
||||||
|
if (!in_array($contact_info, $tokenArray, true)) {
|
||||||
|
$tokenArray[] = $contact_info;
|
||||||
|
} else {
|
||||||
|
// echo "Already in array";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($tokenArray as $token) {
|
||||||
|
send($token['token'], "Neuer Beitrag im Intranet", $collection_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// send("cyO6CxjDS5S7fz5DX1vA95:APA91bGxyA0ai9h1oCt4vrEmfYu0Ics1uX8kxfWNztYgQF1oQgLD-Nql7dM88LfudccwCA3vKM7cQldqOfffbRv-9v_79B7bmnhlFOZUsEsaZVpqWoHaOEyTw7bYo6VY8aC00GGwv_M1", "Test breadcrumb", "Test message");
|
||||||
215
module/api/send_notif.inc.php
Normal file
215
module/api/send_notif.inc.php
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
<?php
|
||||||
|
$user = $_POST['user'];
|
||||||
|
$title = $_POST['title'];
|
||||||
|
$body = $_POST['body'];
|
||||||
|
$domain = $_POST['domain'];
|
||||||
|
|
||||||
|
|
||||||
|
$news_id = $_POST["news_id"];
|
||||||
|
|
||||||
|
|
||||||
|
function getAccessToken($jsonKeyPath)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$jwt = generateJWT($jsonKeyPath);
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, 'https://oauth2.googleapis.com/token');
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
|
||||||
|
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
|
||||||
|
'assertion' => $jwt,
|
||||||
|
]));
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||||
|
'Content-Type: application/x-www-form-urlencoded',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
$jsonResponse = json_decode($response, true);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
echo $th;
|
||||||
|
}
|
||||||
|
return $jsonResponse['access_token'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateJWT($jsonKeyPath)
|
||||||
|
{
|
||||||
|
$jsonKey = json_decode(file_get_contents($jsonKeyPath), true);
|
||||||
|
|
||||||
|
$header = base64_encode(json_encode([
|
||||||
|
'alg' => 'RS256',
|
||||||
|
'typ' => 'JWT',
|
||||||
|
]));
|
||||||
|
|
||||||
|
$iat = time();
|
||||||
|
$exp = $iat + 3600; // 1 час
|
||||||
|
$claimSet = base64_encode(json_encode([
|
||||||
|
'iss' => $jsonKey['client_email'],
|
||||||
|
'scope' => 'https://www.googleapis.com/auth/firebase.messaging',
|
||||||
|
'aud' => 'https://oauth2.googleapis.com/token',
|
||||||
|
'exp' => $exp,
|
||||||
|
'iat' => $iat,
|
||||||
|
]));
|
||||||
|
|
||||||
|
$signatureInput = $header . '.' . $claimSet;
|
||||||
|
|
||||||
|
openssl_sign($signatureInput, $signature, openssl_pkey_get_private($jsonKey['private_key']), 'sha256');
|
||||||
|
$signature = base64_encode($signature);
|
||||||
|
|
||||||
|
return $signatureInput . '.' . $signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// $jsonKeyPath = '../../notifications-c5c54-a9705bfea23c.json';
|
||||||
|
$jsonKeyPath = 'secrets/notifications-c5c54-a9705bfea23c.json';
|
||||||
|
|
||||||
|
|
||||||
|
$accessToken = getAccessToken($jsonKeyPath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$url = 'https://fcm.googleapis.com/v1/projects/notifications-c5c54/messages:send';
|
||||||
|
$host = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// HERE NEW LOGIC
|
||||||
|
// GET ALl MANDANTS FROM NEWS ID
|
||||||
|
$mysql_con = new mysqli("localhost", "web4_intranet", "WewJedjuAbEynk3", "web4_intranet");
|
||||||
|
|
||||||
|
$allowed_contact_ids = [];
|
||||||
|
|
||||||
|
$all_mandants_query = "SELECT main_mandant_id FROM `main_collection_mandant_link` WHERE main_collection_id = " . (int) $news_id;
|
||||||
|
$sql_all_mandants = @mysqli_query($mysql_con, $all_mandants_query);
|
||||||
|
while ($row = @mysqli_fetch_assoc($sql_all_mandants)) {
|
||||||
|
$all_mandants[] = $row["main_mandant_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$all_departments_query = "SELECT main_department_id FROM `main_collection_department_link` WHERE main_collection_id = " . (int) $news_id;
|
||||||
|
$sql_all_departments = @mysqli_query($mysql_con, $all_departments_query);
|
||||||
|
while ($row = @mysqli_fetch_assoc($sql_all_departments)) {
|
||||||
|
$all_departments[] = $row["main_department_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$all_fachbereich_query = "SELECT main_fachbereich_id FROM `main_collection_fachbereich_link` WHERE main_collection_id = " . (int) $news_id;
|
||||||
|
$sql_all_fachbereichs = @mysqli_query($mysql_con, $all_fachbereich_query);
|
||||||
|
while ($row = @mysqli_fetch_assoc($sql_all_fachbereichs)) {
|
||||||
|
$all_fachbereichs[] = $row["main_fachbereich_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$all_einrichtungen_query = "SELECT main_einricht_id FROM `main_collection_einricht_link` WHERE main_collection_id = " . (int) $news_id;
|
||||||
|
$sql_all_einrichtungen = @mysqli_query($mysql_con, $all_einrichtungen_query);
|
||||||
|
while ($row = @mysqli_fetch_assoc($sql_all_einrichtungen)) {
|
||||||
|
$all_einrichtungen[] = $row["main_einricht_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$all_role_query = "SELECT main_role_id FROM `main_collection_role_link` WHERE main_collection_id = " . (int) $news_id;
|
||||||
|
$sql_all_rolles = @mysqli_query($mysql_con, $all_role_query);
|
||||||
|
while ($row = @mysqli_fetch_assoc($sql_all_rolles)) {
|
||||||
|
$all_rolles[] = $row["main_role_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$query_get_all_contacts = "SELECT * FROM main_contact_department";
|
||||||
|
$sql_get_all_contacts = @mysqli_query($mysql_con, $query_get_all_contacts);
|
||||||
|
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($sql_get_all_contacts)) {
|
||||||
|
|
||||||
|
$count++;
|
||||||
|
// 1. Mandant
|
||||||
|
if (!empty($all_mandants) && !in_array($row["main_mandant_id"], $all_mandants)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Department
|
||||||
|
if (!empty($all_departments) && !in_array($row["main_department_id"], $all_departments)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($all_fachbereichs) && !in_array($row["main_bereich_id"], $all_fachbereichs)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($all_einrichtungen) && !in_array($row["main_einricht_id"], $all_einrichtungen)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($all_rolles) && !in_array($row["main_role_id"], $all_rolles)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$allowed_contact_ids[] = $row["main_contact_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$allowed_contact_ids = array_unique($allowed_contact_ids);
|
||||||
|
|
||||||
|
foreach ($allowed_contact_ids as $cid) {
|
||||||
|
$query_contact_token = "SELECT * FROM token_contact WHERE contact_id = " . (int) $cid . " AND in_system = 1 ORDER BY id DESC LIMIT 1";
|
||||||
|
$sql_contactn_token = @mysqli_query($mysql_con, $query_contact_token);
|
||||||
|
|
||||||
|
|
||||||
|
while ($row_token = @mysqli_fetch_assoc($sql_contactn_token)) {
|
||||||
|
|
||||||
|
|
||||||
|
$contactId = trim($row_token['contact_id'] ?? '');
|
||||||
|
$token = trim($row_token['token'] ?? '');
|
||||||
|
|
||||||
|
if (
|
||||||
|
$contactId === '' || $contactId === 'undefined' ||
|
||||||
|
$token === '' || $token === 'undefined'
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'message' => [
|
||||||
|
'token' => $row_token["token"],
|
||||||
|
'notification' => [
|
||||||
|
'title' => $title,
|
||||||
|
'body' => $body,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$jsonData = json_encode($data);
|
||||||
|
|
||||||
|
$ch = curl_init($url);
|
||||||
|
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Authorization: Bearer ' . $accessToken,
|
||||||
|
'Content-Type: application/json; charset=UTF-8',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
|
||||||
|
|
||||||
|
|
||||||
|
$response = curl_exec($ch);
|
||||||
|
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
85
module/api/testGraph.php
Normal file
85
module/api/testGraph.php
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$parts = parse_url("https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."");
|
||||||
|
parse_str($parts['query'], $query);
|
||||||
|
$code = $query['code'];
|
||||||
|
// var_dump(getToken($code));
|
||||||
|
$token = getToken($code);
|
||||||
|
// $refresh_token = getToken($code)[1];
|
||||||
|
// var_dump($token);
|
||||||
|
$headers = [
|
||||||
|
'Authorization: Bearer '.$token[0],
|
||||||
|
'Content-Type: application/json'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$fcmUrl = 'https://graph.microsoft.com/v1.0/me';
|
||||||
|
$cRequest = curl_init();
|
||||||
|
curl_setopt($cRequest, CURLOPT_URL, $fcmUrl);
|
||||||
|
curl_setopt($cRequest, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
curl_setopt($cRequest, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($cRequest, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
$result = curl_exec($cRequest);
|
||||||
|
$obj = json_decode($result);
|
||||||
|
$email = $obj->mail;
|
||||||
|
curl_close($cRequest);
|
||||||
|
|
||||||
|
$pdo = new PDO('mysql:host=localhost;dbname=dev-intranet;charset=utf8', "dev-user", "AcdinemGeor5qua");
|
||||||
|
$GLOBALS["pdo_conn"] = $pdo;
|
||||||
|
// echo $token."</br>".$email."</br>".$refresh_token;
|
||||||
|
|
||||||
|
$noPublish = "CALL insertTokenMicrosoftKey('$token[0]', '$email', '$token[1]')";
|
||||||
|
|
||||||
|
$stmt = $pdo->prepare($noPublish);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
$count = $stmt->fetchColumn();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
setTimeout(() => {
|
||||||
|
window.close();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
</script>'
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getToken($code){
|
||||||
|
$array = array();
|
||||||
|
$headers = [
|
||||||
|
'Content-Type: application/x-www-form-urlencoded'
|
||||||
|
];
|
||||||
|
$fcmUrl = 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token';
|
||||||
|
$cRequest = curl_init();
|
||||||
|
curl_setopt($cRequest, CURLOPT_URL, $fcmUrl);
|
||||||
|
curl_setopt($cRequest, CURLOPT_POST, true);
|
||||||
|
curl_setopt($cRequest, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
curl_setopt($cRequest, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($cRequest, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
curl_setopt($cRequest, CURLOPT_POSTFIELDS, http_build_query(array(
|
||||||
|
'client_id' => '998f5db8-f544-4dda-a10a-79eda88a5437',
|
||||||
|
'scope' => 'openid User.ReadWrite Calendars.ReadWrite Presence.ReadWrite',
|
||||||
|
'code' => $code,
|
||||||
|
'redirect_uri' => 'https://dev-intranet.breadcrumb-online.de/module/api/testGraph.php',
|
||||||
|
'grant_type' => 'authorization_code',
|
||||||
|
'client_secret' => 'S6Z8Q~zae4D8k0mpbCtgAQrAUV5we.FxcR6LHav-'
|
||||||
|
|
||||||
|
)));
|
||||||
|
$result = curl_exec($cRequest);
|
||||||
|
$obj_token = json_decode($result);
|
||||||
|
$token_get = $obj_token->access_token;
|
||||||
|
echo $result;
|
||||||
|
$refresh_token = $obj_token->refresh_token;
|
||||||
|
array_push($array, $token_get);
|
||||||
|
array_push($array, $refresh_token);
|
||||||
|
curl_close($cRequest);
|
||||||
|
return $array;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
22
module/api/tgw.php
Normal file
22
module/api/tgw.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$fcmUrl = 'https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=998f5db8-f544-4dda-a10a-79eda88a5437&response_type=code&redirect_uri=https://dev-intranet.breadcrumb-online.de/module/api/testGraph.php&response_mode=query&scope=offline_access%20User.ReadWrite%20Presence.ReadWrite%20Calendars.ReadWrite&state=12345';
|
||||||
|
$cRequest = curl_init();
|
||||||
|
curl_setopt($cRequest, CURLOPT_URL, $fcmUrl);
|
||||||
|
curl_setopt($cRequest, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($cRequest, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
$result = curl_exec($cRequest);
|
||||||
|
echo $result;
|
||||||
|
curl_close($cRequest);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
141
module/bewerber/edit_stufe.inc.php
Normal file
141
module/bewerber/edit_stufe.inc.php
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($custom_action)) {
|
||||||
|
$action = $custom_action;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$action = $_REQUEST["action"];
|
||||||
|
}
|
||||||
|
switch ($action) {
|
||||||
|
case 'edit_stufeform':
|
||||||
|
edit_stufeform();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete_stufeform':
|
||||||
|
delete_stufeform();
|
||||||
|
break;
|
||||||
|
case 'new_stufeform':
|
||||||
|
|
||||||
|
require_once("edit_stufeform_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'save_stufeform':
|
||||||
|
save_stufeform();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'moveup_line_stufeform':
|
||||||
|
moveup_line_stufeform();
|
||||||
|
require_once("edit_stufe_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'movedown_line_stufeform':
|
||||||
|
movedown_line_stufeform();
|
||||||
|
require_once("edit_stufe_listform.inc.php");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
require_once("edit_stufe_listform.inc.php");
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
function save_stufeform() {
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$input_id = "";
|
||||||
|
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "UPDATE stufe SET
|
||||||
|
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
|
||||||
|
short_text = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_short_text"]) . "',
|
||||||
|
modified_date = " . time() . ",
|
||||||
|
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . "
|
||||||
|
|
||||||
|
WHERE id = '" . $_REQUEST["input_id"] . "'
|
||||||
|
LIMIT 1";
|
||||||
|
$inserted = FALSE;
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$query = "INSERT INTO stufe
|
||||||
|
(main_language_id, description, modified_date, modified_user, short_text)
|
||||||
|
VALUES (
|
||||||
|
" . (int)$GLOBALS["language"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_description']) . "',
|
||||||
|
" . time() . ",
|
||||||
|
" . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_short_text']) . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
$inserted = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($_REQUEST["input_description"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if ($inserted == TRUE) {
|
||||||
|
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("stufeform_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("stufeform_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
edit_stufeform($input_id, $messages);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
header('EDIT_ERROR: 1');
|
||||||
|
$input_stufeform["description"] = $_REQUEST["input_description"];
|
||||||
|
$input_stufeform["short_text"] = $_REQUEST["input_short_text"];
|
||||||
|
$input_stufeform["id"] = $_REQUEST["input_id"];
|
||||||
|
require_once("edit_stufeform_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function edit_stufeform( $_id = "", $messages = array() ) {
|
||||||
|
|
||||||
|
$input_id = '';
|
||||||
|
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} if(isset($_REQUEST['input_id']) && $_id == ''){
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
$query = "SELECT * FROM stufe WHERE id = '" . $input_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_stufeform = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
require_once("edit_stufeform_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$input_stufeform = array();
|
||||||
|
|
||||||
|
require_once("edit_stufeform_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function delete_stufeform() {
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "DELETE FROM stufe WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once("edit_stufe_listform.inc.php");
|
||||||
|
}
|
||||||
|
?>
|
||||||
35
module/bewerber/edit_stufe_listform.inc.php
Normal file
35
module/bewerber/edit_stufe_listform.inc.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$formname = "form_stufe_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_stufeform', true)"); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_stufeform')"); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_stufeform', false, '{$translation->get('delete_stufeform_confirm')}')"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<?php echo current_website_language($site, $language); ?>
|
||||||
|
<h1><?php echo get_translation('left_stufe'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||||
|
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT stufe.id, description AS '" . $translation->get("description") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from stufe left join main_admin_user ON stufe.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY sorting asc";
|
||||||
|
|
||||||
|
$format = array('option', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_id", "edit_stufeform", FALSE, 'update_sortorder_stufe', "sendRequest('delete_stufeform', false, '{$translation->get('delete_stufeform_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
102
module/bewerber/edit_stufeform_cardform.inc.php
Normal file
102
module/bewerber/edit_stufeform_cardform.inc.php
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "bewerber_forms";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
$is_survey = 0;
|
||||||
|
if(isset($_GET["level_2"]) && $_GET["level_2"] == 'survey_forms'){
|
||||||
|
$is_survey = 1;
|
||||||
|
}
|
||||||
|
$query = 'SELECT * FROM google_recaptcha';
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$grecaptcha = @mysqli_fetch_array($result);
|
||||||
|
$reCaptchaDisabled = false;
|
||||||
|
|
||||||
|
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
|
||||||
|
$reCaptchaDisabled = true;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_stufeform["id"] == "") {
|
||||||
|
|
||||||
|
echo $translation->get("new_stufeform");
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
echo $translation->get("edit_stufeform");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Speichern button
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_stufeform', true)");
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_stufeform', true, '', true)");
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// Loeschen button
|
||||||
|
if ($input_stufeform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_stufeform', true, '{$translation->get('delete_stufeform_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zuruecksetzen
|
||||||
|
button("reset", $translation->get("restore"), $formname, "?action=edit", "", FALSE);
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_stufeform["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "input_description", "text", $input_stufeform["description"], 255) ?>
|
||||||
|
<? input($translation->get("short_text"), "input_short_text", "smalltextarea", $input_stufeform["short_text"], 255) ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_stufeform["id"] != "") {
|
||||||
|
show_changed_on($input_stufeform["id"], "stufe");
|
||||||
|
show_changed_by($input_stufeform["id"], "stufe");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<?
|
||||||
|
|
||||||
|
?>
|
||||||
218
module/bewerber/process/edit_process.inc.php
Normal file
218
module/bewerber/process/edit_process.inc.php
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($custom_action)) {
|
||||||
|
$action = $custom_action;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$action = $_REQUEST["action"];
|
||||||
|
}
|
||||||
|
switch ($action) {
|
||||||
|
case 'edit_processform':
|
||||||
|
edit_processform();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete_processform':
|
||||||
|
delete_processform();
|
||||||
|
break;
|
||||||
|
case 'new_processform':
|
||||||
|
|
||||||
|
require_once("edit_processform_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'save_processform':
|
||||||
|
save_processform();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'moveup_line_processform':
|
||||||
|
moveup_line_processform();
|
||||||
|
require_once("edit_process_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'movedown_line_processform':
|
||||||
|
movedown_line_processform();
|
||||||
|
require_once("edit_process_listform.inc.php");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
require_once("edit_process_listform.inc.php");
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
function save_processform() {
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$input_id = "";
|
||||||
|
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "UPDATE bewerber_process SET
|
||||||
|
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
|
||||||
|
short_text = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_short_text"]) . "',
|
||||||
|
modified_date = " . time() . ",
|
||||||
|
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||||
|
code = '". mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_code"])."'
|
||||||
|
|
||||||
|
WHERE id = '" . $_REQUEST["input_id"] . "'
|
||||||
|
LIMIT 1";
|
||||||
|
$inserted = FALSE;
|
||||||
|
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$query = "INSERT INTO bewerber_process
|
||||||
|
(main_language_id, description, modified_date, modified_user, short_text, code)
|
||||||
|
VALUES (
|
||||||
|
" . (int)$GLOBALS["language"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_description']) . "',
|
||||||
|
" . time() . ",
|
||||||
|
" . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_short_text']) . "',
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_code']) . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
$inserted = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($_REQUEST["input_description"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
if ($_REQUEST["input_code"] <> urlencode($_REQUEST["input_code"])) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_textkey_encoding") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if ($inserted == TRUE) {
|
||||||
|
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("processform_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("processform_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$stufe = array();
|
||||||
|
$stufe_ids = $_POST['select_stufe'];
|
||||||
|
if($stufe_ids != NULL && isset($_POST['select_stufe'])){
|
||||||
|
|
||||||
|
$stufe = explode(',', $stufe_ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($stufe) && gettype($stufe) == 'array') {
|
||||||
|
$deleteOld = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM bewerber_process_stufe WHERE process_id='".$input_id."'");
|
||||||
|
|
||||||
|
foreach($stufe as $key => $val){
|
||||||
|
$query = "INSERT INTO bewerber_process_stufe
|
||||||
|
(stufe_id, process_id)
|
||||||
|
VALUES (
|
||||||
|
" . $val . ",
|
||||||
|
'" . $input_id . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
edit_processform($input_id, $messages);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
header('EDIT_ERROR: 1');
|
||||||
|
$input_processform["description"] = $_REQUEST["input_description"];
|
||||||
|
$input_processform["short_text"] = $_REQUEST["input_short_text"];
|
||||||
|
$input_processform["id"] = $_REQUEST["input_id"];
|
||||||
|
require_once("edit_processform_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function edit_processform( $_id = "", $messages = array() ) {
|
||||||
|
|
||||||
|
$input_id = '';
|
||||||
|
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} if(isset($_REQUEST['input_id']) && $_id == ''){
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
$query = "SELECT * FROM bewerber_process WHERE id = '" . $input_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_processform = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
require_once("edit_processform_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$input_processform = array();
|
||||||
|
|
||||||
|
require_once("edit_processform_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function delete_processform() {
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "DELETE FROM bewerber_process WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once("edit_process_listform.inc.php");
|
||||||
|
}
|
||||||
|
function create_stufe_set($process_id){
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
|
||||||
|
$query = "SELECT * FROM stufe WHERE main_language_id = '" . $GLOBALS["language"]['id'] . "'";
|
||||||
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$preselect = array();
|
||||||
|
$query2 = "SELECT * FROM bewerber_process_stufe WHERE process_id = '" . $process_id . "'";
|
||||||
|
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||||
|
|
||||||
|
while($row2 = @mysqli_fetch_array($result2)){
|
||||||
|
array_push($preselect,$row2['stufe_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="label"><?php echo $translation->get("select_stufe"); ?></div>
|
||||||
|
<div class="groups bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
|
||||||
|
<input type="hidden" name="select_stufe">
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="default text"><?php echo $translation->get("select_stufe"); ?></div>
|
||||||
|
<div class="menu">
|
||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
echo "<div class=\"item\" data-value=\"{$row['id']}\">".$row["description"]."</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
|
||||||
|
<script>
|
||||||
|
var $y = jQuery.noConflict();
|
||||||
|
|
||||||
|
$y( document ).ready(function() {
|
||||||
|
$y('.groups.ui.fluid.multiple.dropdown').dropdown('set selected', <?= json_encode($preselect) ?>);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<? }
|
||||||
|
?>
|
||||||
35
module/bewerber/process/edit_process_listform.inc.php
Normal file
35
module/bewerber/process/edit_process_listform.inc.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$formname = "form_process_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_processform', true)"); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_processform')"); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_processform', false, '{$translation->get('delete_processform_confirm')}')"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<?php echo current_website_language($site, $language); ?>
|
||||||
|
<h1><?php echo get_translation('left_process'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||||
|
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT bewerber_process.id, description AS '" . $translation->get("description") . "', code, from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_process left join main_admin_user ON bewerber_process.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY sorting asc";
|
||||||
|
|
||||||
|
$format = array('option', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_id", "edit_processform", FALSE, 'update_sortorder_process', "sendRequest('delete_processform', false, '{$translation->get('delete_processform_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
112
module/bewerber/process/edit_processform_cardform.inc.php
Normal file
112
module/bewerber/process/edit_processform_cardform.inc.php
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "bewerber_forms";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
$is_survey = 0;
|
||||||
|
if(isset($_GET["level_2"]) && $_GET["level_2"] == 'survey_forms'){
|
||||||
|
$is_survey = 1;
|
||||||
|
}
|
||||||
|
$query = 'SELECT * FROM google_recaptcha';
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$grecaptcha = @mysqli_fetch_array($result);
|
||||||
|
$reCaptchaDisabled = false;
|
||||||
|
|
||||||
|
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
|
||||||
|
$reCaptchaDisabled = true;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_processform["id"] == "") {
|
||||||
|
|
||||||
|
echo $translation->get("new_processform");
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
echo $translation->get("edit_processform");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Speichern button
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_processform', true)");
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_processform', true, '', true)");
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// Loeschen button
|
||||||
|
if ($input_processform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_processform', true, '{$translation->get('delete_processform_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_processform["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "input_description", "text", $input_processform["description"], 255) ?>
|
||||||
|
<? input($translation->get("Code"), "input_code", "text", $input_processform["code"], 255) ?>
|
||||||
|
<? input($translation->get("short_text"), "input_short_text", "smalltextarea", $input_processform["short_text"], 255) ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_processform["id"] != "") {
|
||||||
|
show_changed_on($input_processform["id"], "bewerber_process");
|
||||||
|
show_changed_by($input_processform["id"], "bewerber_process");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_processform["id"] != "") {
|
||||||
|
create_stufe_set($input_processform["id"]);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<?
|
||||||
|
|
||||||
|
?>
|
||||||
11
module/bewerber/process/process.php
Normal file
11
module/bewerber/process/process.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function process_edit() {
|
||||||
|
|
||||||
|
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_process.inc.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
11
module/bewerber/stufe.php
Normal file
11
module/bewerber/stufe.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function stufe_edit() {
|
||||||
|
|
||||||
|
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_stufe.inc.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
18
module/bewerber/user/bewerber.php
Normal file
18
module/bewerber/user/bewerber.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function bewerber_edit() {
|
||||||
|
|
||||||
|
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_bewerber.inc.php';
|
||||||
|
}
|
||||||
|
function bewerbung_edit(){
|
||||||
|
if(!isset($_REQUEST["action"]) || $_REQUEST["action"] == ''){
|
||||||
|
$_REQUEST["action"] = 'bewerbung';
|
||||||
|
}
|
||||||
|
|
||||||
|
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_bewerber.inc.php';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
482
module/bewerber/user/edit_bewerber.inc.php
Normal file
482
module/bewerber/user/edit_bewerber.inc.php
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($custom_action)) {
|
||||||
|
$action = $custom_action;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$action = $_REQUEST["action"];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
case 'edit_bewerberform':
|
||||||
|
edit_bewerberform();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'delete_bewerberform':
|
||||||
|
delete_bewerberform();
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case 'save_bewerberform':
|
||||||
|
save_bewerberform();
|
||||||
|
break;
|
||||||
|
case 'save_bewerbungform':
|
||||||
|
save_bewerbungform();
|
||||||
|
break;
|
||||||
|
case 'bewerbung':
|
||||||
|
require_once("edit_bewerbung_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'edit_bewerbung':
|
||||||
|
|
||||||
|
edit_bewerbung();
|
||||||
|
break;
|
||||||
|
case 'loadProcessStufe':
|
||||||
|
loadProcessStufe();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
|
||||||
|
require_once("edit_bewerber_listform.inc.php");
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
function save_bewerbungform() {
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$input_id = "";
|
||||||
|
|
||||||
|
if ($_REQUEST["user_id"] <> '') {
|
||||||
|
$query = "UPDATE bewerber_user SET
|
||||||
|
name = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_name"]) . "',
|
||||||
|
email = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_email"]) . "',
|
||||||
|
modified_date = " . time() . ",
|
||||||
|
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . "
|
||||||
|
|
||||||
|
|
||||||
|
WHERE id = '" . $_REQUEST["user_id"] . "'
|
||||||
|
LIMIT 1";
|
||||||
|
$inserted = FALSE;
|
||||||
|
|
||||||
|
$input_id = $_REQUEST["user_id"];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$query = "INSERT INTO bewerber_user
|
||||||
|
(main_language_id, name, modified_date, modified_user, email)
|
||||||
|
VALUES (
|
||||||
|
" . (int)$GLOBALS["language"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_name']) . "',
|
||||||
|
" . time() . ",
|
||||||
|
" . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_email']) . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
$inserted = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($_REQUEST["input_name"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_name") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
if (($_REQUEST["input_email"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_email") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if ($inserted == TRUE) {
|
||||||
|
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$process = '';
|
||||||
|
if( isset($_POST['select_process'])){
|
||||||
|
|
||||||
|
$process = $_REQUEST['select_process'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($process != '') {
|
||||||
|
$queryDel = "DELETE FROM bewerber_user_process WHERE user_id='".$input_id."' AND main_collection_id = '".$_REQUEST['main_collection_id']."'";
|
||||||
|
|
||||||
|
$deleteOld = @mysqli_query($GLOBALS["mysql_con"], $queryDel );
|
||||||
|
|
||||||
|
|
||||||
|
$query = "INSERT INTO bewerber_user_process
|
||||||
|
(user_id, process_id, main_collection_id)
|
||||||
|
VALUES (
|
||||||
|
" . $input_id . ",
|
||||||
|
'" . $process . "',
|
||||||
|
'".$_REQUEST['main_collection_id']."'
|
||||||
|
)";
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
$stufe = array();
|
||||||
|
$stufe_ids = $_POST['select_stufe'];
|
||||||
|
if($stufe_ids != NULL && isset($_POST['select_stufe'])){
|
||||||
|
|
||||||
|
$stufe = explode(',', $stufe_ids);
|
||||||
|
}
|
||||||
|
$queryDel = "DELETE FROM bewerbung_process_stufe WHERE bewerbung_id = '".$_REQUEST['input_id']."' AND user_id = '".$input_id."'";
|
||||||
|
$deleteOldStufe = @mysqli_query($GLOBALS["mysql_con"],$queryDel);
|
||||||
|
|
||||||
|
if(!empty($stufe) && gettype($stufe) == 'array') {
|
||||||
|
|
||||||
|
foreach($stufe as $key => $val){
|
||||||
|
$query = "INSERT INTO bewerbung_process_stufe
|
||||||
|
(bewerbung_id, stufe_id, process_id, user_id)
|
||||||
|
VALUES (
|
||||||
|
" . $_REQUEST['input_id'] . ",
|
||||||
|
" . $val . ",
|
||||||
|
'" . $process . "',
|
||||||
|
" . $input_id . "
|
||||||
|
)";
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$_REQUEST['action'] = 'save_bewerbungform';
|
||||||
|
edit_bewerbung($_REQUEST['input_id'], $messages);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
header('EDIT_ERROR: 1');
|
||||||
|
$input_bewerberform["name"] = $_REQUEST["input_name"];
|
||||||
|
$input_bewerberform["email"] = $_REQUEST["input_email"];
|
||||||
|
$input_bewerberform["input_id"] = $_REQUEST["input_id"];
|
||||||
|
require_once("edit_bewerbung_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function save_bewerberform() {
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$input_id = "";
|
||||||
|
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "UPDATE bewerber_user SET
|
||||||
|
name = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_name"]) . "',
|
||||||
|
email = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_email"]) . "',
|
||||||
|
modified_date = " . time() . ",
|
||||||
|
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . "
|
||||||
|
|
||||||
|
|
||||||
|
WHERE id = '" . $_REQUEST["input_id"] . "'
|
||||||
|
LIMIT 1";
|
||||||
|
$inserted = FALSE;
|
||||||
|
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$query = "INSERT INTO bewerber_user
|
||||||
|
(main_language_id, name, modified_date, modified_user, email)
|
||||||
|
VALUES (
|
||||||
|
" . (int)$GLOBALS["language"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_name']) . "',
|
||||||
|
" . time() . ",
|
||||||
|
" . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_email']) . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
$inserted = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($_REQUEST["input_name"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_name") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
if (($_REQUEST["input_email"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_email") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if ($inserted == TRUE) {
|
||||||
|
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$process = array();
|
||||||
|
$process_ids = $_POST['select_process'];
|
||||||
|
if($process_ids != NULL && isset($_POST['select_process'])){
|
||||||
|
|
||||||
|
$process = explode(',', $process_ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($process) && gettype($process) == 'array') {
|
||||||
|
$deleteOld = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM bewerber_user_process WHERE user_id='".$input_id."'");
|
||||||
|
|
||||||
|
foreach($process as $key => $val){
|
||||||
|
$query = "INSERT INTO bewerber_user_process
|
||||||
|
(user_id, process_id)
|
||||||
|
VALUES (
|
||||||
|
" . $input_id . ",
|
||||||
|
'" . $val . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// notes
|
||||||
|
|
||||||
|
$deleteData = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM bewerber_user_notes WHERE user_id='".$input_id."' ");
|
||||||
|
print_r($options);
|
||||||
|
if(isset($_REQUEST['totalOption']) && $_REQUEST['totalOption'] > 0){
|
||||||
|
$options = $_REQUEST['totalOption'] ;
|
||||||
|
for($column = 0; $column <= $options; $column++){
|
||||||
|
|
||||||
|
if (array_key_exists("input_user_note_" . $input_id."_".$column,$_POST) && $_POST["input_user_note_" . $input_id."_".$column] != "" && $_POST["input_user_note_" . $input_id."_".$column] != NULL) {
|
||||||
|
|
||||||
|
$query = "INSERT INTO bewerber_user_notes
|
||||||
|
(user_id, notes)
|
||||||
|
VALUES (
|
||||||
|
" . $input_id . ",
|
||||||
|
'" . $_POST["input_user_note_" . $input_id."_".$column] . "'
|
||||||
|
)";
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// notea end
|
||||||
|
edit_bewerberform($input_id, $messages);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
header('EDIT_ERROR: 1');
|
||||||
|
$input_bewerberform["name"] = $_REQUEST["input_name"];
|
||||||
|
$input_bewerberform["email"] = $_REQUEST["input_email"];
|
||||||
|
$input_bewerberform["id"] = $_REQUEST["input_id"];
|
||||||
|
require_once("edit_bewerber_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function edit_bewerbung( $_id = "", $messages = array() ) {
|
||||||
|
|
||||||
|
$input_id = '';
|
||||||
|
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} if((isset($_REQUEST['input_id']) || isset($_REQUEST['data-inputid']) ) && $_id == ''){
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_REQUEST['data-inputid'])){
|
||||||
|
$input_id = $_REQUEST["data-inputid"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
$query = "SELECT bu.*, bun.id as bunID, bun.main_collection_id, bun.contact_id FROM bewerber_user as bu INNER JOIN bewerbung as bun on bu.id = bun.user_id WHERE bun.id = '" . $input_id . "' LIMIT 1";
|
||||||
|
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_bewerberform = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
require_once("edit_bewerbung_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$input_bewerberform = array();
|
||||||
|
|
||||||
|
require_once("edit_bewerbung_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function edit_bewerberform( $_id = "", $messages = array() ) {
|
||||||
|
|
||||||
|
$input_id = '';
|
||||||
|
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} if(isset($_REQUEST['input_id']) && $_id == ''){
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
}
|
||||||
|
if(isset($_REQUEST['bewerber_id'])){
|
||||||
|
$input_id = $_REQUEST['bewerber_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
$query = "SELECT * FROM bewerber_user WHERE id = '" . $input_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_bewerberform = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
require_once("edit_bewerber_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$input_bewerberform = array();
|
||||||
|
|
||||||
|
require_once("edit_bewerber_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function delete_processform() {
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "DELETE FROM bewerber_user WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once("edit_process_listform.inc.php");
|
||||||
|
}
|
||||||
|
function create_process_set($user_id, $collection_id){
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
|
||||||
|
$query = "SELECT * FROM bewerber_process WHERE main_language_id = '" . $GLOBALS["language"]['id'] . "'";
|
||||||
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$preselect = array();
|
||||||
|
$query2 = "SELECT * FROM bewerber_user_process WHERE user_id = '" . $user_id . "' AND main_collection_id = ".$collection_id;
|
||||||
|
|
||||||
|
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||||
|
|
||||||
|
while($row2 = @mysqli_fetch_array($result2)){
|
||||||
|
array_push($preselect,$row2['process_id']);
|
||||||
|
}
|
||||||
|
echo "<div class=\"label\"><label for=\"" ."select_process" . "\">" . $translation->get("select_process") . "</label></div>";
|
||||||
|
echo "<div class=\"input\"><select onchange=\"loadProcessStufe(this.value);\" class=\"bigselect\" name=\"" . "select_process" . "\" id=\"" . "select_process" . "\">";
|
||||||
|
|
||||||
|
|
||||||
|
// neue typen die nur fuer kollektionen vorgesehen sind
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
$selected = '';
|
||||||
|
if (in_array($row['id'], $preselect)) {
|
||||||
|
$selected = 'selected="selected"';
|
||||||
|
}
|
||||||
|
echo "<option " . $selected . " value=\"" . $row['id'] . "\">" . $row["description"].' - '.$row['code'] . "</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo "</select>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<? }
|
||||||
|
function loadProcessStufe(){
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$process_id = $_REQUEST['process_id'];
|
||||||
|
$query = "SELECT st.* FROM stufe as st INNER JOIN bewerber_process_stufe as bps on st.id = bps.stufe_id WHERE st.main_language_id = '" . $GLOBALS["language"]['id'] . "' AND process_id = ".$process_id ;
|
||||||
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="label"><?php echo $translation->get("select_stufe"); ?></div>
|
||||||
|
<div class="groups bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
|
||||||
|
<input type="hidden" name="select_stufe">
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="default text"><?php echo $translation->get("select_stufe"); ?></div>
|
||||||
|
<div class="menu">
|
||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
echo "<div class=\"item\" data-value=\"{$row['id']}\">".$row["description"]."</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
|
||||||
|
<script>
|
||||||
|
var $y = jQuery.noConflict();
|
||||||
|
|
||||||
|
$y( document ).ready(function() {
|
||||||
|
$y('.groups.ui.fluid.multiple.dropdown').dropdown();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
function create_stufe_set($bunID){
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
|
||||||
|
$query = "SELECT st.* FROM stufe as st INNER JOIN bewerbung_process_stufe as bps on st.id = bps.stufe_id WHERE main_language_id = '" . $GLOBALS["language"]['id'] . "' AND bewerbung_id = ".$bunID;
|
||||||
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$preselect = array();
|
||||||
|
$query2 = "SELECT * FROM bewerbung_process_stufe WHERE bewerbung_id = '" . $bunID . "'";
|
||||||
|
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||||
|
|
||||||
|
while($row2 = @mysqli_fetch_array($result2)){
|
||||||
|
array_push($preselect,$row2['stufe_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="label"><?php echo $translation->get("select_stufe"); ?></div>
|
||||||
|
<div class="groups bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
|
||||||
|
<input type="hidden" name="select_stufe">
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="default text"><?php echo $translation->get("select_stufe"); ?></div>
|
||||||
|
<div class="menu">
|
||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
echo "<div class=\"item\" data-value=\"{$row['id']}\">".$row["description"]."</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
|
||||||
|
<script>
|
||||||
|
var $y = jQuery.noConflict();
|
||||||
|
|
||||||
|
$y( document ).ready(function() {
|
||||||
|
$y('.groups.ui.fluid.multiple.dropdown').dropdown('set selected', <?= json_encode($preselect) ?>);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<? }
|
||||||
|
|
||||||
|
function create_notes_set($user_id){
|
||||||
|
$query = "SELECT * FROM bewerber_user_notes WHERE user_id = ".$user_id;
|
||||||
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$counter = 0;
|
||||||
|
while($row = @mysqli_fetch_array($result)){
|
||||||
|
echo '<div class="notes_input input_note_'.$counter.'">';
|
||||||
|
echo '<textarea name="input_user_note_'.$user_id.'_'.$counter.'"> '.$row['notes'].'</textarea>';
|
||||||
|
|
||||||
|
echo '<button type="button" data-counter="'.$counter.'" class="r-btnRemove btnRemove btn btn-danger">Entfernen -</button>';
|
||||||
|
echo '</div>';
|
||||||
|
$counter++;
|
||||||
|
}
|
||||||
|
echo '<input type="hidden" id="totalOption" name="totalOption" value="'.$counter.'">';
|
||||||
|
}
|
||||||
|
?>
|
||||||
156
module/bewerber/user/edit_bewerber_cardform.inc.php
Normal file
156
module/bewerber/user/edit_bewerber_cardform.inc.php
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "bewerber_forms";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
$is_survey = 0;
|
||||||
|
|
||||||
|
$query = 'SELECT * FROM google_recaptcha';
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$grecaptcha = @mysqli_fetch_array($result);
|
||||||
|
$reCaptchaDisabled = false;
|
||||||
|
|
||||||
|
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
|
||||||
|
$reCaptchaDisabled = true;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo $translation->get("edit_user");
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Speichern button
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_bewerberform', true)");
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_bewerberform', true, '', true)");
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// Loeschen button
|
||||||
|
if ($input_bewerberform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_bewerberform', true, '{$translation->get('delete_user_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_bewerberform["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("name"), "input_name", "text", $input_bewerberform["name"], 255) ?>
|
||||||
|
<? input($translation->get("email"), "input_email", "text", $input_bewerberform["email"], 255) ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_bewerberform["id"] != "") {
|
||||||
|
show_changed_on($input_bewerberform["id"], "bewerber_user");
|
||||||
|
show_changed_by($input_bewerberform["id"], "bewerber_user");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<div class="notes_section">
|
||||||
|
<button style="position:inherit;" type="button" class="r-btnAdd btnAdd btn btn-primary" data-user="<?=$input_bewerberform["id"];?>">Hinzufügen +</button>
|
||||||
|
<?php
|
||||||
|
if ($input_bewerberform["id"] != "") {
|
||||||
|
create_notes_set($input_bewerberform["id"]);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<?php $formname .= "_listing";
|
||||||
|
?>
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="bewerber_id" type="hidden" value="<?= $input_bewerberform['id']; ?>">
|
||||||
|
<?php
|
||||||
|
$query = "SELECT bun.id, description as '". $translation->get("description")."', from_unixtime(bun.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_user AS bu left join main_admin_user ON bu.modified_user = main_admin_user.id INNER JOIN bewerbung as bun on bu.id = bun.user_id INNER JOIN main_collection as mc on bun.main_collection_id = mc.id where (bu.id = " . (int)$input_bewerberform['id'] . ") ORDER BY id DESC";
|
||||||
|
|
||||||
|
$format = array('option', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_id", "edit_bewerbung", FALSE, 'update_sortorder_bewerber', "sendRequest('delete_bewerbung', false, '{$translation->get('delete_stufeform_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
<?
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
|
||||||
|
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.btnAdd').click(function(){
|
||||||
|
var counter = $('#totalOption').val();
|
||||||
|
var user = $(this).attr('data-user');
|
||||||
|
counter++;
|
||||||
|
|
||||||
|
$('#totalOption').val(counter);
|
||||||
|
|
||||||
|
$('.notes_section').append(loadNextModule(counter, user));
|
||||||
|
});
|
||||||
|
$('.btnRemove').click(function(){
|
||||||
|
|
||||||
|
counter = $(this).attr('data-counter');
|
||||||
|
$('.input_note_'+ counter).remove();
|
||||||
|
console.log('counter ist' + counter);
|
||||||
|
counter--;
|
||||||
|
$('#totalOption').val(counter);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
function myFunctionDelete(counter){
|
||||||
|
|
||||||
|
$('.input_note_'+ counter).remove();
|
||||||
|
|
||||||
|
|
||||||
|
counter--;
|
||||||
|
$('#totalOption').val(counter);
|
||||||
|
}
|
||||||
|
function loadNextModule(counter, user_id){
|
||||||
|
var html = '<div class="notes_input input_note_'+counter+'">' +
|
||||||
|
'<textarea name="input_user_note_'+user_id+'_'+counter+'"> </textarea>'+
|
||||||
|
'<button type="button" onclick="myFunctionDelete('+counter+')" data-counter="'+counter+'" class="r-btnRemove btnRemove btn btn-danger">Entfernen -</button>'+
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
return html
|
||||||
|
}
|
||||||
|
</script>
|
||||||
35
module/bewerber/user/edit_bewerber_listform.inc.php
Normal file
35
module/bewerber/user/edit_bewerber_listform.inc.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$formname = "form_bewerber_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_bewerberform')"); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_bewerberform', false, '{$translation->get('delete_user_confirm')}')"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<?php echo current_website_language($site, $language); ?>
|
||||||
|
<h1><?php echo get_translation('bewerber'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||||
|
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT bu.id, bu.name AS '" . $translation->get("name") . "', from_unixtime(bu.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_user AS bu left join main_admin_user ON bu.modified_user = main_admin_user.id INNER JOIN contactform_header as ch on bu.contact_form_id = ch.id where (bu.main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY id DESC";
|
||||||
|
|
||||||
|
$format = array('option', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_id", "edit_bewerberform", FALSE, 'update_sortorder_bewerber', "sendRequest('delete_bewerberform', false, '{$translation->get('delete_user_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
229
module/bewerber/user/edit_bewerbung_cardform.inc.php
Normal file
229
module/bewerber/user/edit_bewerbung_cardform.inc.php
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "bewerber_forms";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
$bewerber_id = (isset($_REQUEST['bewerber_id']) ? $_REQUEST['bewerber_id'] : "");
|
||||||
|
|
||||||
|
$is_survey = 0;
|
||||||
|
|
||||||
|
$query = 'SELECT * FROM google_recaptcha';
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$grecaptcha = @mysqli_fetch_array($result);
|
||||||
|
$reCaptchaDisabled = false;
|
||||||
|
|
||||||
|
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
|
||||||
|
$reCaptchaDisabled = true;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo $translation->get("edit_bewerbung");
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Speichern button
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_bewerbungform', true)");
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_bewerbungform', true, '', true)");
|
||||||
|
|
||||||
|
if($bewerber_id != ''){
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('edit_bewerberform', true)");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// Loeschen button
|
||||||
|
if ($input_bewerberform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_bewerbungform', true, '{$translation->get('delete_stufeform_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_bewerberform["bunID"] ?>">
|
||||||
|
<input name="user_id" type="hidden" value="<?= $input_bewerberform["id"] ?>">
|
||||||
|
<input name="bewerber_id" type="hidden" value="<?= $bewerber_id ?>">
|
||||||
|
|
||||||
|
<input name="contact_id" type="hidden" value="<?= $input_bewerberform["contact_id"] ?>">
|
||||||
|
<input name="main_collection_id" type="hidden" value="<?= $input_bewerberform["main_collection_id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("name"), "input_name", "text", $input_bewerberform["name"], 255) ?>
|
||||||
|
<? input($translation->get("email"), "input_email", "text", $input_bewerberform["email"], 255) ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_bewerberform["id"] != "") {
|
||||||
|
show_changed_on($input_bewerberform["bunId"], "bewerbung");
|
||||||
|
show_changed_by($input_bewerberform["bunID"], "bewerbung");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_bewerberform["id"] != "") {
|
||||||
|
$query = "SELECT * FROM main_collection WHERE id = ".$input_bewerberform["main_collection_id"];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$collection = @mysqli_fetch_array($result);
|
||||||
|
input($translation->get("job_applied"), "main_collection", "text", $collection["description"], 255, TRUE) ;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_bewerberform["id"] != "") {
|
||||||
|
create_process_set($input_bewerberform["id"], $input_bewerberform["main_collection_id"]);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php if ($input_bewerberform["id"] != "") { ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
|
||||||
|
<div class="process_stufe">
|
||||||
|
<?php
|
||||||
|
if ($input_bewerberform["id"] != "") {
|
||||||
|
create_stufe_set($input_bewerberform["bunID"]);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<hr>
|
||||||
|
<h2><?php echo $translation->get("top_userdata");; ?></h2>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
$query = "SELECT cl.* FROM contactform_line as cl INNER JOIN contactform_header as ch on cl.header_id = ch.id WHERE header_id = '" . $input_bewerberform["contact_id"] . "' AND code != 'registration_name' AND code != 'registration_email' AND is_registration = 1 ORDER BY sorting ASC";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if (@mysqli_num_rows($result) > 0) {
|
||||||
|
while ($field = @mysqli_fetch_array($result)) {
|
||||||
|
$queryLink = "SELECT bucl.* FROM contactform_line as cl INNER JOIN bewerber_user_contact_link as bucl on cl.id = bucl.line_id WHERE header_id = '" . $input_bewerberform["contact_id"] . "' AND line_id = ".$field['id']." AND user_id = ". $input_bewerberform["id"]." ORDER BY sorting ASC";
|
||||||
|
$resultLink = @mysqli_query($GLOBALS['mysql_con'], $queryLink);
|
||||||
|
$row = @mysqli_fetch_array($resultLink);
|
||||||
|
echo '<td>';
|
||||||
|
input($field['name'], $field["code"], "text", $row["content"], 255, TRUE) ;
|
||||||
|
echo '</td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<?
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadProcessStufe( process_id ) {
|
||||||
|
|
||||||
|
|
||||||
|
$('.process_stufe', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
if (process_id == "" || process_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader', $('#<?php echo $formname ?>')).show();
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>' )[0]);
|
||||||
|
formData.append("process_id", process_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=loadProcessStufe",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
// dataType : 'html',
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
console.log('log ist' + xhr.getResponseHeader('REQUIRES_AUTH'));
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.loader').hide();
|
||||||
|
$('.process_stufe' ).html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, exception) {
|
||||||
|
var msg = '';
|
||||||
|
if (jqXHR.status === 0) {
|
||||||
|
msg = 'Not connect.\n Verify Network.';
|
||||||
|
} else if (jqXHR.status == 404) {
|
||||||
|
msg = 'Requested page not found. [404]';
|
||||||
|
} else if (jqXHR.status == 500) {
|
||||||
|
msg = 'Internal Server Error [500].';
|
||||||
|
} else if (exception === 'parsererror') {
|
||||||
|
msg = 'Requested JSON parse failed.';
|
||||||
|
} else if (exception === 'timeout') {
|
||||||
|
msg = 'Time out error.';
|
||||||
|
} else if (exception === 'abort') {
|
||||||
|
msg = 'Ajax request aborted.';
|
||||||
|
} else {
|
||||||
|
msg = 'Uncaught Error.\n' + jqXHR.responseText;
|
||||||
|
}
|
||||||
|
console.log(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
35
module/bewerber/user/edit_bewerbung_listform.inc.php
Normal file
35
module/bewerber/user/edit_bewerbung_listform.inc.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$formname = "form_bewerber_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_bewerbung')"); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_bewerbung', false, '{$translation->get('delete_stufeform_confirm')}')"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<?php echo current_website_language($site, $language); ?>
|
||||||
|
<h1><?php echo get_translation('left_bewerbung'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||||
|
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT bun.id, bu.name AS '" . $translation->get("name") . "', description as '". $translation->get("description")."', from_unixtime(bun.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_user AS bu left join main_admin_user ON bu.modified_user = main_admin_user.id INNER JOIN bewerbung as bun on bu.id = bun.user_id INNER JOIN main_collection as mc on bun.main_collection_id = mc.id where (bu.main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY id DESC";
|
||||||
|
|
||||||
|
$format = array('option', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_id", "edit_bewerbung", FALSE, 'update_sortorder_bewerber', "sendRequest('delete_bewerbung', false, '{$translation->get('delete_stufeform_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
9
module/calendar/calendar.php
Normal file
9
module/calendar/calendar.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function calendar_show() {
|
||||||
|
require("show_calendar.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
function calendar_edit() {
|
||||||
|
require_once('edit_calendar.inc.php');
|
||||||
|
}
|
||||||
250
module/calendar/calendar_collection_serial.php
Normal file
250
module/calendar/calendar_collection_serial.php
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$query = "SELECT * FROM calendar_serial WHERE main_collection_id = " . $input_collection['id'];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if(@mysqli_num_rows($result) > 0) {
|
||||||
|
$row = mysqli_fetch_array($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
$date_from = new DateTime($row['date_from']);
|
||||||
|
$date_to = new DateTime($row['date_to']);
|
||||||
|
|
||||||
|
$weekday = array("Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag");
|
||||||
|
$weekday_en = array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||||
|
$month = array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
|
||||||
|
$ordinal = array("ersten", "zweiten", "dritten", "vierten", "letzten");
|
||||||
|
$repeating_type_en= array("daily", "weekly", "monthly", "yearly");
|
||||||
|
$repeating_type = array("Tächlich", "Wöchentlich", "Monatlich", "Jährlich");
|
||||||
|
|
||||||
|
$default_value = 1;
|
||||||
|
$value = $default_value;
|
||||||
|
|
||||||
|
function getCalendarValue($value, $type, $classname = ""){
|
||||||
|
$amount = 0;
|
||||||
|
switch ($value['repeating_type']) {
|
||||||
|
case 'daily':
|
||||||
|
$amount = $value['day_nr'];
|
||||||
|
break;
|
||||||
|
case 'weekly':
|
||||||
|
$amount = $value['week_nr'];
|
||||||
|
break;
|
||||||
|
case 'monthly':
|
||||||
|
if($value['repeating_radio'] == 1){
|
||||||
|
if($classname == 'first_day'){
|
||||||
|
$amount = $value['day_nr'];
|
||||||
|
}else if($classname == 'first_month'){
|
||||||
|
$amount = $value['month_nr'];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if($classname == 'second_day'){
|
||||||
|
$amount = $value['day_nr'];
|
||||||
|
}else if($classname == 'second_week'){
|
||||||
|
$amount = $value['week_nr'];
|
||||||
|
}else if($classname == 'second_month'){
|
||||||
|
$amount = $value['month_nr'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'yearly':
|
||||||
|
if($classname == 'year_nr'){
|
||||||
|
$amount = $value['year_nr'];
|
||||||
|
}
|
||||||
|
if($value['repeating_radio'] == 1){
|
||||||
|
if($classname == 'first_day'){
|
||||||
|
$amount = $value['day_nr'];
|
||||||
|
}else if($classname == 'first_month'){
|
||||||
|
$amount = $value['month_nr'];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if($classname == 'second_day'){
|
||||||
|
$amount = $value['day_nr'];
|
||||||
|
}else if($classname == 'second_week'){
|
||||||
|
$amount = $value['week_nr'];
|
||||||
|
}else if($classname == 'second_month'){
|
||||||
|
$amount = $value['month_nr'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if($type != $value['repeating_type']){
|
||||||
|
$amount = 0;
|
||||||
|
}
|
||||||
|
return $amount;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<button id="serientermin">Serientermin erstellen</button>
|
||||||
|
<div class='serial_date'>
|
||||||
|
<div class="serial_heading">
|
||||||
|
<h3>Serienmuster auswählen</h3>
|
||||||
|
<button onclick="closeSerialize();saveCollection(false);" id="serienterminclose"></button>
|
||||||
|
</div>
|
||||||
|
<label id='date_from'>Von</label>
|
||||||
|
<input id='date_from' type="date" name="date_from" value="<?= $date_from->format('Y-m-d') ?>">
|
||||||
|
<label id='date_to'>Bis</label>
|
||||||
|
<input id='date_to' type="date" name="date_to" value="<?= $date_to->format('Y-m-d') ?>">
|
||||||
|
<label id='start_time'>Beginn</label>
|
||||||
|
<input id='start_time' type="time" name="start_time" value="<?= $row['start_time']?>">
|
||||||
|
<label id='end_time'>Ende</label>
|
||||||
|
<input id='end_time' type="time" name="end_time" value="<?= $row['end_time']?>">
|
||||||
|
<div class="serial-content">
|
||||||
|
<div class="radio-buttons">
|
||||||
|
<?php createRadioButtons($repeating_type, $repeating_type_en, $row['repeating_type'])?>
|
||||||
|
<input type='hidden' value='<?= $row['repeating_type'] ?>' name='input_repeating_type' id='repeating_type'>
|
||||||
|
<input type='hidden' value='<?= $row['repeating_radio'] ?>' name='input_repeating_radio' id='repeating_radio'>
|
||||||
|
</div>
|
||||||
|
<div class="option-wrapper">
|
||||||
|
<div class='daily repeating_type' style='display: none'>
|
||||||
|
<h4>Täglich</h4>
|
||||||
|
Jede/Alle <input min="0" type="number" name="daily_count" value="<?= getCalendarValue($row, 'daily') ?>"> Tag(e)
|
||||||
|
</div>
|
||||||
|
<div class='weekly repeating_type' style='display: none'>
|
||||||
|
<h4>Wöchentlich</h4>
|
||||||
|
Jede/Alle <input min="0" type="number" name="weekly_count" value="<?= getCalendarValue($row, 'weekly') ?>"> Woche(n) am
|
||||||
|
<div class="week-wrapper">
|
||||||
|
<?php createCheckbox($weekday, $weekday_en, $row)?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='monthly repeating_type' style='display: none'>
|
||||||
|
<h4>Monatlich</h4>
|
||||||
|
<div class="monthly-option">
|
||||||
|
<input type="radio" <?= getRadioChecked($row['repeating_radio'], '1') ?> name="monthly_type" id="monthly_first" value="1"/>
|
||||||
|
|
||||||
|
<label for='monthly_first'>Am</label>
|
||||||
|
<input min="0" type="number" name="monthly_day_1" value="<?= getCalendarValue($row, 'monthly', 'first_day') ?>">. Tag jedes
|
||||||
|
<input min="0" type="number" name="monthly_count_1" value="<?= getCalendarValue($row, 'monthly', 'first_month') ?>">. Monats
|
||||||
|
</div>
|
||||||
|
<div class="monthly-option">
|
||||||
|
<input type="radio" <?= getRadioChecked($row['repeating_radio'], '2') ?> name="monthly_type" id="monthly_second" value="2"/>
|
||||||
|
|
||||||
|
<label for='monthly_second'>Am</label>
|
||||||
|
<select name='monthly_day_2'>
|
||||||
|
<?php createDropdown($ordinal, getCalendarValue($row, 'monthly', 'second_day'))?>
|
||||||
|
</select>
|
||||||
|
<select name='monthly_week_2'>
|
||||||
|
<?php createDropdown($weekday, getCalendarValue($row, 'monthly', 'second_week'))?>
|
||||||
|
</select>
|
||||||
|
jeden/alle <input min="0" type="number" name="montly_count_2" value="<?= getCalendarValue($row, 'monthly', 'second_month') ?>"> Monat(e)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='yearly repeating_type' style='display: none'>
|
||||||
|
<h4>Jährlich</h4>
|
||||||
|
<div class="yearly-options">
|
||||||
|
Jedes/Alle <input min="0" type="number" name="yearly_count" value="<?= getCalendarValue($row, 'yearly', 'year_nr') ?>"> Jahr(n)
|
||||||
|
</div>
|
||||||
|
<div class="yearly-options">
|
||||||
|
<label for='yearly_first'>Am</label>
|
||||||
|
<input type="radio" <?= getRadioChecked($row['repeating_radio'], '1') ?> name="yearly_type" id="yearly_first" value="1"/>
|
||||||
|
<input type="number" name="yearly_day_1" value="<?= getCalendarValue($row, 'yearly', 'first_day') ?>">.
|
||||||
|
<select name='yearly_month_1'>
|
||||||
|
<?php createDropdown($month, getCalendarValue($row, 'yearly', 'first_month'))?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="yearly-options">
|
||||||
|
<label for='yearly_second'>Am</label>
|
||||||
|
<input type="radio" <?= getRadioChecked($row['repeating_radio'], '2') ?> name="yearly_type" id="yearly_second" value="2"/>
|
||||||
|
<select name='yearly_day_2'>
|
||||||
|
<?php createDropdown($ordinal, getCalendarValue($row, 'yearly', 'second_day'))?>
|
||||||
|
</select>
|
||||||
|
<select name='yearly_week_2'>
|
||||||
|
<?php createDropdown($weekday, getCalendarValue($row, 'yearly', 'second_week'))?>
|
||||||
|
</select>
|
||||||
|
im
|
||||||
|
<select name='yearly_month_2'>
|
||||||
|
<?php createDropdown($month, getCalendarValue($row, 'yearly', 'second_month'))?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-overlay"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function show_type(type){
|
||||||
|
$(".repeating_type").hide();
|
||||||
|
$("."+type).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".repeating_type").each(function(){
|
||||||
|
let repeating_type = $('input[name="repeating_type"]:checked').val();
|
||||||
|
if($(this).hasClass(repeating_type)){
|
||||||
|
$(this).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("button#serientermin").click(function(){
|
||||||
|
$(".serial_date").addClass("modal-open");
|
||||||
|
$(".serial_date.modal-open").prependTo("body");
|
||||||
|
$(".modal-overlay").prependTo("body");
|
||||||
|
$(".modal-overlay").show();
|
||||||
|
$(this).hide()
|
||||||
|
});
|
||||||
|
|
||||||
|
function closeSerialize(){
|
||||||
|
$(".serial_date.modal-open").appendTo(".collection_form");
|
||||||
|
$(".serial_date").removeClass("modal-open");
|
||||||
|
$("button#serientermin").show();
|
||||||
|
$(".modal-overlay").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('input[name="repeating_type"]').change(function() {
|
||||||
|
$('#repeating_type').val($(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[name="monthly_type"]').change(function() {
|
||||||
|
$('#repeating_radio').val($(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[name="yearly_type"]').change(function() {
|
||||||
|
$('#repeating_radio').val($(this).val());
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
function getRadioChecked($repeating_radio, $value){
|
||||||
|
$checked = 'checked';
|
||||||
|
if($repeating_radio == $value){
|
||||||
|
return $checked;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createDropdown($array, $active){
|
||||||
|
echo "<option selected disabled>---</option>";
|
||||||
|
foreach ($array as $key => $value) {
|
||||||
|
$key = $key+1;
|
||||||
|
$selected = "";
|
||||||
|
if($key == $active){
|
||||||
|
$selected = "selected";
|
||||||
|
}
|
||||||
|
echo "<option ".$selected." value='".$key."'>".$value."</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function createCheckbox($array, $weekday_en, $row){
|
||||||
|
foreach ($array as $key => $value) {
|
||||||
|
$checked = "";
|
||||||
|
if($row[$weekday_en[$key]] == 1){
|
||||||
|
$checked = "checked";
|
||||||
|
}
|
||||||
|
echo "<label for='".$weekday_en[$key]."'>".$value."</label>";
|
||||||
|
echo "<input ".$checked." type='checkbox' name='".$weekday_en[$key]."' id='".$weekday_en[$key]."'>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function createRadioButtons($array, $repeating_type_en, $selected_type){
|
||||||
|
foreach ($array as $key => $value) {
|
||||||
|
$checked = "";
|
||||||
|
if($repeating_type_en[$key] == $selected_type){
|
||||||
|
$checked = "checked";
|
||||||
|
}
|
||||||
|
echo "<div class='radio-group'>";
|
||||||
|
echo "<input ".$checked." type='radio' name='repeating_type' id='".$repeating_type_en[$key]."' value='".$repeating_type_en[$key]."' onclick='show_type(\"{$repeating_type_en[$key]}\");'/>";
|
||||||
|
echo "<label for='".$repeating_type_en[$key]."'>".$value."</label>";
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
152
module/calendar/edit_calendar.inc.php
Normal file
152
module/calendar/edit_calendar.inc.php
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<?php
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
if (isset($custom_action)) {
|
||||||
|
$action = $custom_action;
|
||||||
|
} else {
|
||||||
|
$action = $_REQUEST["action"];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
|
||||||
|
case 'edit_calendar':
|
||||||
|
edit_calendar();
|
||||||
|
break;
|
||||||
|
case 'delete_calendar':
|
||||||
|
delete_calendar();
|
||||||
|
break;
|
||||||
|
case 'new_calendar':
|
||||||
|
require_once("edit_calendar_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'new_contact_calendar':
|
||||||
|
require_once("edit_calendar_contact_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'save_calendar':
|
||||||
|
save_calendar();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
require_once("edit_calendar_listform.inc.php");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit_calendar( $_id = "", $messages = array() ) {
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} else {
|
||||||
|
$input_id = $_REQUEST["input_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
$query = "SELECT * FROM calendar_header WHERE id = '" . $input_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_calendar = @mysqli_fetch_array($result);
|
||||||
|
if(isset($_REQUEST['input_contactform_id'])){
|
||||||
|
require_once("edit_calendar_contact_cardform.inc.php");
|
||||||
|
}else{
|
||||||
|
require_once("edit_calendar_cardform.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$input_calendar = array();
|
||||||
|
require_once("edit_calendar_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_calendar() {
|
||||||
|
if ($_REQUEST["input_id"] <> '') {
|
||||||
|
$query = "DELETE FROM calendar_header WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
// zuordnung von Seiten loeschen
|
||||||
|
$query = "DELETE FROM main_page_link WHERE main_sitepart_id = 1 AND main_sitepart_header_id = '" . $_REQUEST["input_id"]."'";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
|
||||||
|
$query = "DELETE FROM multi_contactform_link WHERE main_sitepart_id = 1 AND main_sitepart_header_id = '" . $_REQUEST["input_id"]."'";
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
update_sitepart_changes(1, $_REQUEST["input_id"], TRUE);
|
||||||
|
}
|
||||||
|
require_once("edit_calendar_listform.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_calendar() {
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$input_id = "";
|
||||||
|
$input_all_languages = ($_POST["input_all_languages"] == "on") ? 1 : 0;
|
||||||
|
|
||||||
|
if (($_REQUEST["input_description"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if ($inserted == TRUE) {
|
||||||
|
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("calendar_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("calendar_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
update_sitepart_changes(1, $input_id);
|
||||||
|
|
||||||
|
if (is_page_edit()) {
|
||||||
|
header('EDIT_ERROR: 1'); // verhindern, dass overlay geschlossen wird
|
||||||
|
if (line_already_exists($_REQUEST["input_page_id"], 1, $input_id) === FALSE) {
|
||||||
|
assoc_sitepart(1, $input_id, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['force_close'] == 1) {
|
||||||
|
edit_content_page();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_calendar($input_id, $messages);
|
||||||
|
|
||||||
|
} else if(is_contact_edit()){
|
||||||
|
|
||||||
|
header('EDIT_ERROR: 1'); // verhindern, dass overlay geschlossen wird
|
||||||
|
if (line_already_exists($_REQUEST["input_section_id"], 1, $input_id) === FALSE) {
|
||||||
|
|
||||||
|
assoc_sitepart(1, $input_id, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['force_close'] == 1) {
|
||||||
|
edit_contactform();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_calendar($input_id, $messages);
|
||||||
|
}
|
||||||
|
elseif (is_component_edit()) {
|
||||||
|
header('EDIT_ERROR: 1'); // verhindern, dass overlay geschlossen wird
|
||||||
|
if (line_already_exists($_REQUEST["input_component_id"], 1, $input_id) === FALSE) {
|
||||||
|
assoc_sitepart(1, $input_id, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['force_close'] == 1) {
|
||||||
|
edit_component("", $messages);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_calendar($input_id, $messages);
|
||||||
|
} else {
|
||||||
|
edit_calendar($input_id, $messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
header('EDIT_ERROR: 1');
|
||||||
|
$input_calendar["description"] = $_REQUEST["input_description"];
|
||||||
|
$input_calendar["type"] = 0;
|
||||||
|
$input_calendar["content"] = $_REQUEST["calendar"];
|
||||||
|
$input_calendar["id"] = $_REQUEST["input_id"];
|
||||||
|
$input_calendar["all_languages"] = $input_all_languages;
|
||||||
|
require_once("edit_calendar_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
72
module/calendar/edit_calendar_cardform.inc.php
Normal file
72
module/calendar/edit_calendar_cardform.inc.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_calendar_card";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_calendar["id"] == "") {
|
||||||
|
echo $translation->get("new_calendar");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_calendar");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
if (is_page_edit() || is_component_edit()) {
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('edit_content_page', true)");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?= button("save", $translation->get("save"), $formname, "loadCard('save_calendar', true)"); ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?= button("save", $translation->get("save_and_close"), $formname, "loadCard('save_calendar', true, '', true)"); ?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
if ($input_calendar["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_calendar', true, '{$translation->get('delete_calendar_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?= button("reset", $translation->get("restore"), $formname, "?action=edit_calendar", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_calendar["id"] ?>">
|
||||||
|
<input name="input_page_id" type="hidden" value="<?= $input_page_id ?>">
|
||||||
|
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||||
|
<input name="data-sitepartid" type="hidden" value="1">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "input_description", "text", $input_calendar["description"], 255) ?>
|
||||||
|
<? input($translation->get("show_in_all_languages"), "input_all_languages", "checkbox", $input_calendar["all_languages"]) ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($input_calendar["id"] != "") {
|
||||||
|
show_changed_on($input_calendar["id"], "calendar_header");
|
||||||
|
show_changed_by($input_calendar["id"], "calendar_header");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
68
module/calendar/ics.inc.php
Normal file
68
module/calendar/ics.inc.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
$calendar_id = $_GET['calendar'];
|
||||||
|
|
||||||
|
//Wird benötigt um Enviroment Variable zu holen
|
||||||
|
session_start();
|
||||||
|
$currDir = __DIR__;
|
||||||
|
$rootDir = dirname(dirname($currDir));
|
||||||
|
$mysydeDir = $rootDir . '/mysyde';
|
||||||
|
|
||||||
|
require_once($rootDir . '/vendor/autoload.php');
|
||||||
|
require_once($rootDir . "/mysyde/frontend/frontend_functions.inc.php");
|
||||||
|
|
||||||
|
// $baseDir = rtrim(dirname(dirname(__DIR__,2),'/'));
|
||||||
|
|
||||||
|
$envDir = $rootDir . '/config';
|
||||||
|
$envFilePath = $envDir . '/.env';
|
||||||
|
if (is_dir($envDir) && file_exists($envFilePath) && is_file($envFilePath) && is_readable($envFilePath)) {
|
||||||
|
$dotenv = new \Dotenv\Dotenv($envDir);
|
||||||
|
$dotenv->load();
|
||||||
|
}
|
||||||
|
$common = $mysydeDir ."/common/common_functions.inc.php";
|
||||||
|
require_once($common);
|
||||||
|
|
||||||
|
$connEnv = (local_environment()) ? $mysydeDir."/dc.config.php" : $mysydeDir."/dc-server.config.php";
|
||||||
|
|
||||||
|
require_once($connEnv);
|
||||||
|
|
||||||
|
db_connect();
|
||||||
|
|
||||||
|
function get_collection_data($collection_id, $content_id){
|
||||||
|
$query = "SELECT * FROM main_collection_link WHERE main_collection_id = ".$collection_id . " AND main_collection_setup_content_id = ".$content_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$row = @mysqli_fetch_array($result);
|
||||||
|
return $row['data'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT * FROM main_collection WHERE id = ".$calendar_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$row = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
$uid = get_collection_rewrite($row['description'], $row['id']);
|
||||||
|
|
||||||
|
$start_date = new DateTime(get_collection_data($calendar_id, 54));
|
||||||
|
|
||||||
|
// ICS-Daten generieren
|
||||||
|
$icsData = "BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID: ".$uid."
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DTSTART:".$start_date->format('Ymd')."T100000Z
|
||||||
|
DTEND:".$start_date->format('Ymd')."T100000Z
|
||||||
|
SUMMARY: ".$row['description']."
|
||||||
|
DESCRIPTION: ".$row['description']."
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR";
|
||||||
|
|
||||||
|
// Dateinamen festlegen
|
||||||
|
|
||||||
|
$filename = $uid.".ics";
|
||||||
|
|
||||||
|
// ICS-Datei generieren
|
||||||
|
header('Content-Type: text/calendar; charset=utf-8');
|
||||||
|
header('Content-Disposition: attachment; filename=' . $filename);
|
||||||
|
|
||||||
|
echo $icsData;
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
173
module/calendar/show_calendar.inc.php
Normal file
173
module/calendar/show_calendar.inc.php
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
<?php
|
||||||
|
$pdo = new PDO("mysql:host=".$GLOBALS['myservername'].";dbname=".$GLOBALS['mydb'].';charset=utf8', $GLOBALS['mylogin'], $GLOBALS['mypass']);
|
||||||
|
$GLOBALS["pdo_conn"] = $pdo;
|
||||||
|
|
||||||
|
$select_collection = $GLOBALS['pdo_conn']->prepare("SELECT * FROM main_collection WHERE main_collection_setup_id = :main_collection_setup_id ORDER BY sorting ASC");
|
||||||
|
$select_collection->execute(array(':main_collection_setup_id' => '47'));
|
||||||
|
$res_collection = $select_collection->fetchALL(PDO::FETCH_ASSOC);
|
||||||
|
$GLOBALS['array'] = array();
|
||||||
|
|
||||||
|
$weekday = array("Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag");
|
||||||
|
$GLOBALS['weekday_en'] = array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||||
|
$month = array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
|
||||||
|
$GLOBALS['month_en'] = array("january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december");
|
||||||
|
$ordinal = array("ersten", "zweiten", "dritten", "vierten", "letzten");
|
||||||
|
$repeating_type_en= array("daily", "weekly", "monthly", "yearly");
|
||||||
|
$repeating_type = array("Tächlich", "Wöchentlich", "Monatlich", "Jährlich");
|
||||||
|
|
||||||
|
foreach ($res_collection as $key => $value) {
|
||||||
|
$serial = selectCalendarSerial($value['id']);
|
||||||
|
$start_date = new DateTime($value['validity_from']);
|
||||||
|
$end_date = new DateTime($value['validity_to']);
|
||||||
|
switch ($serial['repeating_type']) {
|
||||||
|
case 'daily':
|
||||||
|
setDailyEvent($serial, $start_date, $end_date, $value['id']);
|
||||||
|
break;
|
||||||
|
case 'weekly':
|
||||||
|
setWeeklyEvent($serial, $start_date, $end_date, $value['id']);
|
||||||
|
break;
|
||||||
|
case 'monthly':
|
||||||
|
setMonthlyEvent($serial, $start_date, $end_date, $value['id']);
|
||||||
|
break;
|
||||||
|
case 'yearly':
|
||||||
|
setYearlyEvent($serial, $start_date, $end_date, $value['id']);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setDailyEvent($serial, $start_date, $end_date, $collection_id){
|
||||||
|
$date = new DateTime($start_date->format('Y-m-d'));
|
||||||
|
while ($date <= $end_date) {
|
||||||
|
buildArray($collection_id, $date);
|
||||||
|
if($serial == 0){
|
||||||
|
$date->modify('+1 days');
|
||||||
|
}else{
|
||||||
|
$date->modify('+'.$serial['day_nr'].' days');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setWeeklyEvent($serial, $start_date, $end_date, $collection_id){
|
||||||
|
$date = new DateTime($start_date->format('Y-m-d'));
|
||||||
|
while ($date <= $end_date) {
|
||||||
|
foreach ($GLOBALS['weekday_en'] as $weekday_key => $weekday_value) {
|
||||||
|
if($serial[$weekday_value] != 0){
|
||||||
|
$real_date = new DateTime(date("d.m.Y", strtotime($weekday_value, $date->getTimestamp())));
|
||||||
|
buildArray($collection_id, $real_date);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$date->modify('+'.$serial['week_nr'].' weeks');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMonthlyEvent($serial, $start_date, $end_date, $collection_id){
|
||||||
|
switch ($serial['repeating_radio']) {
|
||||||
|
case '1':
|
||||||
|
$date = new DateTime($start_date->format('Y-m-').$serial['day_nr']);
|
||||||
|
while ($date <= $end_date) {
|
||||||
|
buildArray($collection_id, $date);
|
||||||
|
$date->modify('+'.$serial['month_nr'].' months');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$date = new DateTime($start_date->format('Y-m-').'1');
|
||||||
|
while ($date <= $end_date) {
|
||||||
|
$real_date = new DateTime(date("d.m.Y", strtotime($serial['day_nr'] . $GLOBALS['weekday_en'][$serial['week_nr']-1], $date->getTimestamp())));
|
||||||
|
buildArray($collection_id, $real_date);
|
||||||
|
$date->modify('+'.$serial['month_nr'].' months');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setYearlyEvent($serial, $start_date, $end_date, $collection_id){
|
||||||
|
switch ($serial['repeating_radio']) {
|
||||||
|
case '1':
|
||||||
|
$date = new DateTime($start_date->format('Y-').$serial['month_nr'].'-'.$serial['day_nr']);
|
||||||
|
while ($date <= $end_date) {
|
||||||
|
buildArray($collection_id, $date);
|
||||||
|
$date->modify('+'.$serial['year_nr'].' years');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$date = new DateTime($start_date->format('Y-m-').'1');
|
||||||
|
while ($date <= $end_date) {
|
||||||
|
$real_date = new DateTime(date("d.m.Y", strtotime($serial['day_nr'] . $GLOBALS['weekday_en'][$serial['week_nr']-1] . $GLOBALS['month_en'][$serial['month_nr']-1], $date->getTimestamp())));
|
||||||
|
buildArray($collection_id, $real_date);
|
||||||
|
$date->modify('+'.$serial['year_nr'].' years');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildArray($collection_id, $date){
|
||||||
|
$select_collection = $GLOBALS['pdo_conn']->prepare("SELECT * FROM main_collection WHERE id = :id LIMIT 1");
|
||||||
|
$select_collection->execute(array(':id' => $collection_id));
|
||||||
|
$res_collection = $select_collection->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
$title = selectCollectionData($collection_id, 199);
|
||||||
|
$description = selectCollectionData($collection_id, 199);
|
||||||
|
|
||||||
|
$fullviewLinkEvent = get_link_to_navigation($GLOBALS["navigation"]['id']) . get_collection_rewrite($res_collection['description'], $res_collection['id']);
|
||||||
|
$linkTitle = 'Mehr erfahren';
|
||||||
|
|
||||||
|
$GLOBALS['array'][] = [
|
||||||
|
'id' => "event-".$collection_id,
|
||||||
|
'name' => $title,
|
||||||
|
'description' => $description,
|
||||||
|
'link' => $fullviewLinkEvent,
|
||||||
|
'link_title' => $linkTitle,
|
||||||
|
'date' => $date->format('Y.m.d'),
|
||||||
|
'type' => "event",
|
||||||
|
'color' => "gray",
|
||||||
|
'everyYear' => false
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCalendarSerial($collection_id){
|
||||||
|
$select_collection = $GLOBALS['pdo_conn']->prepare("SELECT * FROM calendar_serial WHERE main_collection_id = :main_collection_id");
|
||||||
|
$select_collection->execute(array(':main_collection_id' => $collection_id));
|
||||||
|
$res_collection = $select_collection->fetch(PDO::FETCH_ASSOC);
|
||||||
|
return $res_collection;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCollectionData($collection_id, $main_collection_setup_content_id){
|
||||||
|
$select_collection = $GLOBALS['pdo_conn']->prepare("SELECT * FROM main_collection_link WHERE main_collection_id = :main_collection_id AND main_collection_setup_content_id = :main_collection_setup_content_id");
|
||||||
|
$select_collection->execute(array(':main_collection_id' => $collection_id, ':main_collection_setup_content_id' => $main_collection_setup_content_id));
|
||||||
|
$res_collection = $select_collection->fetch(PDO::FETCH_ASSOC);
|
||||||
|
return $res_collection['data'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class='calendar'>
|
||||||
|
<div id="calendar"></div>
|
||||||
|
</div>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/plugins/evo-calendar/css/evo-calendar.min.css">
|
||||||
|
<script type="text/javascript" src="/plugins/evo-calendar/js/evo-calendar.min.js?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/evo-calendar/js/evo-calendar.js')?>"></script>
|
||||||
|
<script>
|
||||||
|
var evoCalendar = [];
|
||||||
|
$('#calendar').evoCalendar({
|
||||||
|
todayHighlight: true,
|
||||||
|
sidebarDisplayDefault: false,
|
||||||
|
eventDisplayDefault: false,
|
||||||
|
firstDayOfWeek: 1,
|
||||||
|
'eventHeaderFormat': 'dd. MM yyyy',
|
||||||
|
language: 'de'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php foreach($GLOBALS['array'] as $key => $val){?>
|
||||||
|
<script>
|
||||||
|
evoCalendar.push(<? echo json_encode($val); ?>);
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
|
<script>
|
||||||
|
// console.log(evoCalendar);
|
||||||
|
$("#calendar").evoCalendar('addCalendarEvent', evoCalendar);
|
||||||
|
</script>
|
||||||
286
module/certificate/certificate.inc.php
Normal file
286
module/certificate/certificate.inc.php
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
<?
|
||||||
|
switch ($_GET["action"]) {
|
||||||
|
case 'edit':
|
||||||
|
edit_certificate();
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
delete_certificate($certificate['id']);
|
||||||
|
break;
|
||||||
|
case 'new':
|
||||||
|
require_once("certificate_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'save':
|
||||||
|
save_certificate();
|
||||||
|
break;
|
||||||
|
case 'save_line_certificate':
|
||||||
|
save_line_certificate();
|
||||||
|
break;
|
||||||
|
case 'new_line_certificate':
|
||||||
|
require_once("certificate_line_cardform.inc.php");
|
||||||
|
// new_line_certificate();
|
||||||
|
break;
|
||||||
|
case 'edit_line_certificate':
|
||||||
|
edit_line_certificate();
|
||||||
|
break;
|
||||||
|
case 'delete_line_certificate':
|
||||||
|
delete_line_certificate();
|
||||||
|
break;
|
||||||
|
case 'moveup_line_certificate':
|
||||||
|
moveup_line_certificate();
|
||||||
|
edit_certificate();
|
||||||
|
break;
|
||||||
|
case 'movedown_line_certificate':
|
||||||
|
movedown_line_certificate();
|
||||||
|
edit_certificate();
|
||||||
|
break;
|
||||||
|
case 'open_card':
|
||||||
|
open_card();
|
||||||
|
case 'load_collection_pages' : load_collection_pages(); break;
|
||||||
|
case 'load_collections' : load_collections(); break;
|
||||||
|
default:
|
||||||
|
require_once("certificate_listform.inc.php");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
function open_card() {?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
openCardOnStart = true;
|
||||||
|
openCardAction = 'new';
|
||||||
|
</script>
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
function edit_certificate( $_id = "", $messages = array() ) {
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} else {
|
||||||
|
$input_id = $_POST["input_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
|
||||||
|
$pdoHost = getenv('MAIN_MYSQL_DB_HOST');
|
||||||
|
$pdoPort = getenv('MAIN_MYSQL_DB_PORT');
|
||||||
|
$pdoUser = getenv('MAIN_MYSQL_DB_USER');
|
||||||
|
$pdoPass = getenv('MAIN_MYSQL_DB_PASS');
|
||||||
|
$pdoSchema = getenv('MAIN_MYSQL_DB_SCHEMA');
|
||||||
|
|
||||||
|
$pdo = new \DynCom\mysyde\common\classes\PDOQueryWrapper($pdoHost, $pdoPort, $pdoSchema, $pdoUser, $pdoPass);
|
||||||
|
|
||||||
|
$prepStatement = " SELECT * FROM main_certificate WHERE id = :id LIMIT 1 ";
|
||||||
|
$params = [
|
||||||
|
[':id', $input_id, PDO::PARAM_STR],
|
||||||
|
];
|
||||||
|
$pdo->setQuery($prepStatement);
|
||||||
|
$pdo->prepareQuery();
|
||||||
|
$pdo->bindParameters($params);
|
||||||
|
$pdo->executePreparedStatement();
|
||||||
|
$result = $pdo->getResultArray();
|
||||||
|
|
||||||
|
if (count($result) == 1) {
|
||||||
|
$input_certificate = $result[0];
|
||||||
|
require_once("certificate_cardform.inc.php");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$input_certificate = array();
|
||||||
|
require_once("certificate_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_certificate() {
|
||||||
|
if ($_POST["input_id"] <> '') {
|
||||||
|
$query = "DELETE FROM main_certificate WHERE id = '" . $_POST["input_id"] . "' LIMIT 1";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_certificate() {
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
$input_id = "";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$input_recurring = ($_POST["input_recurring"] == "on") ? 1 : 0;
|
||||||
|
|
||||||
|
if ($_POST["input_id"] <> '') {
|
||||||
|
$inserted = FALSE;
|
||||||
|
$input_id = $_POST["input_id"];
|
||||||
|
$query = "UPDATE main_certificate
|
||||||
|
SET title = '" . $_POST['input_title'] . "',
|
||||||
|
description = '" . $_POST['input_description'] . "',
|
||||||
|
recurring = '" . $input_recurring . "',
|
||||||
|
validity_period = '" . $_POST['input_validity_period'] . "',
|
||||||
|
access_type = '" . $_POST['input_access_type'] . "',
|
||||||
|
main_collection_page_list_id = '" . $_POST['main_collection_page_list_id'] . "',
|
||||||
|
main_collection_setup_id = '" . $_POST['main_collection_setup_id'] . "',
|
||||||
|
main_collection_id = '" . $_POST['main_collection_id'] . "'
|
||||||
|
WHERE id = '" . $_POST["input_id"] . "' LIMIT 1";
|
||||||
|
} else {
|
||||||
|
$query = "INSERT INTO main_certificate (id, title, description, recurring, validity_period, access_type, main_collection_page_list_id, main_collection_setup_id, main_collection_id) VALUES (
|
||||||
|
NULL,
|
||||||
|
'" . $_POST['input_title'] . "',
|
||||||
|
'" . $_POST['input_description'] . "',
|
||||||
|
'" . $input_recurring . "',
|
||||||
|
'" . $_POST['input_validity_period'] . "',
|
||||||
|
'" . $_POST['input_access_type'] . "',
|
||||||
|
'" . $_POST['main_collection_page_list_id'] . "',
|
||||||
|
'" . $_POST['main_collection_setup_id'] . "',
|
||||||
|
'" . $_POST['main_collection_id'] . "'
|
||||||
|
)";
|
||||||
|
$inserted = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if ($inserted == TRUE) {
|
||||||
|
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("certificate_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("certificate_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$mandant_ids = $_POST['select_mandant'];
|
||||||
|
$mandant = explode(',', $mandant_ids);
|
||||||
|
if(!empty($mandant) && gettype($mandant) == 'array') {
|
||||||
|
$deleteLink = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM certificate_mandant_link WHERE main_certificate_id = ".$input_id);
|
||||||
|
foreach($mandant as $key => $mandant_value){
|
||||||
|
$query = "INSERT INTO certificate_mandant_link
|
||||||
|
(main_certificate_id, main_mandant_id)
|
||||||
|
VALUES (
|
||||||
|
" . $input_id . ",
|
||||||
|
" . $mandant_value . "
|
||||||
|
)";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
save_certificate_contact_list($input_id);
|
||||||
|
edit_certificate($input_id, $messages);
|
||||||
|
} else {
|
||||||
|
require_once("edit_certificate_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_certificate_contact_list($certificate_id){
|
||||||
|
$datetime = new DateTime();
|
||||||
|
$query = "SELECT * FROM main_contact WHERE active = 1 ORDER BY name ASC";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
$done = ($_POST["done_".$row['id']] == "on") ? 1 : 0;
|
||||||
|
$active = ($_POST["active_".$row['id']] == "on") ? 1 : 0;
|
||||||
|
$deleteActive = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM certificate_contact WHERE certificate_id=".$certificate_id." AND main_contact_id = ".$row['id']);
|
||||||
|
if($active == 1){
|
||||||
|
$query_active = "INSERT INTO certificate_contact (certificate_id, main_contact_id, active)
|
||||||
|
VALUES (
|
||||||
|
'".$certificate_id."',
|
||||||
|
'".$row['id']."',
|
||||||
|
'".$active."'
|
||||||
|
)";
|
||||||
|
$result_active = @mysqli_query($GLOBALS['mysql_con'], $query_active);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query2 = "SELECT * FROM certificate_contact_submit WHERE certificate_id = ".$certificate_id." AND main_contact_id = ".$row['id']. " ORDER BY id DESC LIMIT 1";
|
||||||
|
$result2 = @mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||||
|
$row2 = @mysqli_fetch_array($result2);
|
||||||
|
$query3 = "";
|
||||||
|
if($row2 != NULL){
|
||||||
|
if($row2['correct'] != $done){
|
||||||
|
$query3 = "UPDATE certificate_contact_submit SET correct = ".$done.", issue_date = '".$datetime->format('Y-m-d H:i:s')."' WHERE id = ".$row2['id'];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if($done == 1){
|
||||||
|
$query3 = "INSERT INTO certificate_contact_submit (certificate_id, main_contact_id, issue_date, correct)
|
||||||
|
VALUES (
|
||||||
|
'".$certificate_id."',
|
||||||
|
'".$row['id']."',
|
||||||
|
'".$datetime->format('Y-m-d H:i:s')."',
|
||||||
|
'".$done."'
|
||||||
|
)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result3 = @mysqli_query($GLOBALS['mysql_con'], $query3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collection_pages() {
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
ob_start();
|
||||||
|
create_page_with_collection_select($_POST['collection_setup_id'], $translation->get("page_with_collections"), "main_collection_page_list_id", array(), false);
|
||||||
|
$output1 = ob_get_clean();
|
||||||
|
|
||||||
|
$active_groups = array();
|
||||||
|
$query = "SELECT main_collection_setup_group_id from main_page_collection_group_link where main_page_link_id = '" . $_POST['page_link_id']."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'],$query);
|
||||||
|
while ($row = @mysqli_fetch_array($result)) {
|
||||||
|
$active_groups[] = $row['main_collection_setup_group_id'];
|
||||||
|
}
|
||||||
|
ob_start();
|
||||||
|
create_collection_preview_group_select($_POST['collection_setup_id'], $_POST['page_link_id'], $active_groups);
|
||||||
|
$output2 = ob_get_clean();
|
||||||
|
|
||||||
|
echo json_encode(array('page_with_collection_select' => $output1, 'collection_preview_group_select' => $output2));
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collections() {
|
||||||
|
// ajax call
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$setup_id = $_POST['main_collection_setup_id'];
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
if($setup_id != "") {
|
||||||
|
$query = "SELECT * FROM main_collection WHERE main_collection_setup_id = '" . $setup_id . "'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'],$query);
|
||||||
|
while ($row = @mysqli_fetch_array($result,1)) {
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input_select($translation->get("choose_collection"),"main_collection_id",$values = $collection_ids,$value_names = $collections,"", false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_mandant_select($category_id){
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$query = "SELECT * FROM main_mandant";
|
||||||
|
$mandant_result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
$preselect = array();
|
||||||
|
|
||||||
|
$query = "SELECT * FROM certificate_mandant_link WHERE main_certificate_id = ".$category_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
while($row = @mysqli_fetch_array($result)){
|
||||||
|
array_push($preselect,$row['main_mandant_id']);
|
||||||
|
}
|
||||||
|
$allselect = array();
|
||||||
|
?>
|
||||||
|
<div class="label"><?php echo $translation->get("mandant")?></div>
|
||||||
|
<div class="mandant bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
|
||||||
|
<input type="hidden" name="select_mandant">
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="default text"><?php echo $translation->get("mandant")?></div>
|
||||||
|
<div class="menu">
|
||||||
|
<?
|
||||||
|
while($mandant = @mysqli_fetch_array($mandant_result)) {
|
||||||
|
array_push($allselect,$mandant['id']);
|
||||||
|
echo "<div class=\"item\" data-value=\"{$mandant['id']}\">".$mandant["description"]."</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='all_mandants' ><?php echo $translation->get("all_mandants")?></div>
|
||||||
|
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
|
||||||
|
<script>
|
||||||
|
var $y = jQuery.noConflict();
|
||||||
|
|
||||||
|
$y( document ).ready(function() {
|
||||||
|
$y('.mandant.ui.fluid.multiple.dropdown').dropdown('set selected', <?= json_encode($preselect) ?>);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".all_mandants").click(function() {
|
||||||
|
$y('.mandant.ui.fluid.multiple.dropdown').dropdown('set selected', <?= json_encode($allselect) ?>);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
}
|
||||||
209
module/certificate/certificate_cardform.inc.php
Normal file
209
module/certificate/certificate_cardform.inc.php
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
<?php
|
||||||
|
$formname = "form_certificate_card";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
$collection_setups = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
if ($input_certificate['main_collection_setup_id'] != "") {
|
||||||
|
$query = "SELECT * FROM main_collection WHERE main_collection_setup_id = " . $input_certificate['main_collection_setup_id'];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_certificate["id"] == "") {
|
||||||
|
echo $translation->get("new_certificate");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_certificate");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("save", $translation->get("save"), $formname, "loadCard('save', true)"); ?>
|
||||||
|
<?= button("save", $translation->get("save_and_close"), $formname, "loadCard('save', true, '', true)"); ?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete', true, '{$translation->get('delete_user_confirm')}', true)", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_certificate["id"] ?>">
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr class="certificate_table_row">
|
||||||
|
<td class="w-100">
|
||||||
|
<? input($translation->get("title"), "input_title", "text", $input_certificate["title"], 255) ?>
|
||||||
|
<? input($translation->get("description"), "input_description", "textarea", $input_certificate["description"]) ?>
|
||||||
|
</td>
|
||||||
|
<td class="w-100">
|
||||||
|
<div class="basic_settings">
|
||||||
|
<div class="toggle_headline opened">
|
||||||
|
<h3><?= $translation->get("basic_settings") ?></h3>
|
||||||
|
<div class="chevron"></div>
|
||||||
|
</div>
|
||||||
|
<div class="toggle_area">
|
||||||
|
<div class="recurring_group">
|
||||||
|
<div class="recurring_input">
|
||||||
|
<? input($translation->get("recurring"), "input_recurring", "checkbox", $input_certificate["recurring"]) ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$types = [
|
||||||
|
'3' => "3 Monate",
|
||||||
|
'6' => "6 Monate",
|
||||||
|
'12' => "12 Monate",
|
||||||
|
'24' => "24 Monate",
|
||||||
|
'36' => "36 Monate (Mindestlaufzeit)",
|
||||||
|
];
|
||||||
|
$preselect = 4;
|
||||||
|
if(isset($input_certificate['validity_period']) ){
|
||||||
|
$preselect = $input_certificate['validity_period'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="recurring_select">
|
||||||
|
<? input_select($translation->get("validity_period"), "input_validity_period", $values = array_keys($types), $value_names = array_values($types), $preselect, FALSE, FALSE); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='basic_setting_inputs'>
|
||||||
|
<div class='collection_setup'>
|
||||||
|
<? create_collection_select($collection_setups, $translation->get("choose_collection_type"), "main_collection_setup_id", $input_certificate['main_collection_setup_id'], FALSE, TRUE, "loadPagesWithCollection(this.value);"); ?>
|
||||||
|
</div></div>
|
||||||
|
<div class="collection_pages">
|
||||||
|
<? create_page_with_collection_select($input_certificate['main_collection_setup_id'], $translation->get("page_with_collections"), "main_collection_page_list_id", $input_certificate['main_collection_page_list_id'], FALSE); ?>
|
||||||
|
</div></div>
|
||||||
|
<div class="collection_list_choose">
|
||||||
|
<? input_select($translation->get("choose_collection"), "main_collection_id", $values = $collection_ids, $value_names = $collections, $input_certificate["main_collection_id"], FALSE, FALSE); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= create_mandant_select($input_certificate['id']); ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
if ($input_certificate['id'] != "") {
|
||||||
|
require_once 'certificate_contact_listform.inc.php';
|
||||||
|
}?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#input_recurring').change(function(){
|
||||||
|
if(this.checked){
|
||||||
|
$('.recurring_select').show();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('.recurring_select').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".toggle_headline").click(function() {
|
||||||
|
$(this).next().slideToggle();
|
||||||
|
$(this).toggleClass("opened");
|
||||||
|
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadPagesWithCollection( collection_setup_id ) {
|
||||||
|
load_collections(collection_setup_id);
|
||||||
|
$('.collection_pages').html("");
|
||||||
|
|
||||||
|
if (collection_setup_id == "" || collection_setup_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("collection_setup_id", collection_setup_id);
|
||||||
|
formData.append("page_link_id", '<?php echo $input_line["id"]; ?>');
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collection_pages",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
dataType : 'json',
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.collection_pages').html(output.page_with_collection_select);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, exception) {
|
||||||
|
var msg = '';
|
||||||
|
if (jqXHR.status === 0) {
|
||||||
|
msg = 'Not connect.\n Verify Network.';
|
||||||
|
} else if (jqXHR.status == 404) {
|
||||||
|
msg = 'Requested page not found. [404]';
|
||||||
|
} else if (jqXHR.status == 500) {
|
||||||
|
msg = 'Internal Server Error [500].';
|
||||||
|
} else if (exception === 'parsererror') {
|
||||||
|
msg = 'Requested JSON parse failed.';
|
||||||
|
} else if (exception === 'timeout') {
|
||||||
|
msg = 'Time out error.';
|
||||||
|
} else if (exception === 'abort') {
|
||||||
|
msg = 'Ajax request aborted.';
|
||||||
|
} else {
|
||||||
|
msg = 'Uncaught Error.\n' + jqXHR.responseText;
|
||||||
|
}
|
||||||
|
console.log(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collections( collection_setup_id ) {
|
||||||
|
$('.collection_list_choose').html("");
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("main_collection_setup_id", collection_setup_id);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collections",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose').html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
115
module/certificate/certificate_contact_listform.inc.php
Normal file
115
module/certificate/certificate_contact_listform.inc.php
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_contact_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
|
||||||
|
function load_contact_list_old($input_id){
|
||||||
|
$query = "SELECT certificate_contact_link.id,
|
||||||
|
main_contact.name,
|
||||||
|
main_mandant.description,
|
||||||
|
certificate_contact_link.issue_date,
|
||||||
|
main_certificate.validity_period,
|
||||||
|
certificate_contact_link.active
|
||||||
|
FROM certificate_contact_link
|
||||||
|
LEFT JOIN
|
||||||
|
main_contact
|
||||||
|
ON main_contact.id = certificate_contact_link.main_contact_id
|
||||||
|
LEFT JOIN
|
||||||
|
main_mandant
|
||||||
|
ON main_mandant.id = main_contact.master_mandant_id
|
||||||
|
LEFT JOIN
|
||||||
|
main_certificate
|
||||||
|
ON main_certificate.id = certificate_contact_link.certificate_id
|
||||||
|
WHERE certificate_id = '".$input_id."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
$issue_date = new DateTime($row['issue_date']);
|
||||||
|
$validity_date = new DateTime($row['issue_date']);
|
||||||
|
$current_date = new DateTime();
|
||||||
|
$validity_date->modify('+'.$row['validity_period'].' months');
|
||||||
|
$class = "";
|
||||||
|
$expired = 0;
|
||||||
|
if($current_date >= $validity_date){
|
||||||
|
$class = "expired";
|
||||||
|
$expired = 1;
|
||||||
|
}
|
||||||
|
if($row['active'] == 0){
|
||||||
|
$class = "not_active";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr class='<?= $class ?>'>
|
||||||
|
<td><?= $expired ?></td>
|
||||||
|
<td><?= $row['name'] ?></td>
|
||||||
|
<td><?= $row['description'] ?></td>
|
||||||
|
<td><?= $issue_date->format('d.m.Y') ?></td>
|
||||||
|
<td><?= $validity_date->format('d.m.Y') ?></td>
|
||||||
|
<td><?= $row['active'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_contact_list($input_id){
|
||||||
|
$query = "SELECT * FROM main_contact WHERE active = 1 ORDER BY name ASC";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while($row = @mysqli_fetch_array($result)) {
|
||||||
|
$query2 = "SELECT * FROM certificate_contact_submit LEFT JOIN main_certificate ON main_certificate.id = certificate_contact_submit.certificate_id WHERE certificate_id = '".$input_id."' AND main_contact_id = ".$row['id']." ORDER BY certificate_contact_submit.id DESC LIMIT 1";
|
||||||
|
$result2 = @mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||||
|
$row2 = @mysqli_fetch_array($result2);
|
||||||
|
|
||||||
|
$query_mandant = "SELECT * FROM main_mandant WHERE id = ".$row['master_mandant_id'];
|
||||||
|
$result_mandant = @mysqli_query($GLOBALS['mysql_con'], $query_mandant);
|
||||||
|
$row_mandant = @mysqli_fetch_array($result_mandant);
|
||||||
|
|
||||||
|
$query_active = "SELECT * FROM certificate_contact WHERE certificate_id= '".$input_id."' AND main_contact_id = ".$row['id'];
|
||||||
|
$result_active = @mysqli_query($GLOBALS['mysql_con'], $query_active);
|
||||||
|
$row_active = @mysqli_fetch_array($result_active);
|
||||||
|
|
||||||
|
$datetime = "";
|
||||||
|
if($row2['issue_date']){
|
||||||
|
$datetime = new DateTime($row2['issue_date']);
|
||||||
|
$datetime = $datetime->format('d.m.Y');
|
||||||
|
}
|
||||||
|
$issue_date = new DateTime($row2['issue_date']);
|
||||||
|
$validity_date = new DateTime($row2['issue_date']);
|
||||||
|
$validity_date->modify('+'.$row2['validity_period'].' months');
|
||||||
|
|
||||||
|
$done = "";
|
||||||
|
$active = "";
|
||||||
|
$class = "";
|
||||||
|
if(isset($row_active) && $row_active['active'] == 1){
|
||||||
|
$active = "checked='checked'";
|
||||||
|
}
|
||||||
|
if($row2['correct'] == 1){
|
||||||
|
$done = "checked='checked'";
|
||||||
|
$class = "checked";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr class='<?= $class ?>'>
|
||||||
|
<input type='hidden' name='contact_<?= $row['id']?>'>
|
||||||
|
<td><input type='checkbox' class='checkbox' name='done_<?= $row['id']?>' <?= $done?>></td>
|
||||||
|
<td><?= $row['name'] ?></td>
|
||||||
|
<td><?= $row_mandant['description'] ?></td>
|
||||||
|
<td><?= $issue_date->format('d.m.Y')?></td>
|
||||||
|
<td><?= $validity_date->format('d.m.Y')?></td>
|
||||||
|
<td><input type='checkbox' class='checkbox' name='active_<?= $row['id']?>' <?= $active?>></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<h2>Benutzerliste</h2>
|
||||||
|
<table class='learning_unit_user_list'>
|
||||||
|
<tr>
|
||||||
|
<th>Erledigt</th>
|
||||||
|
<th>Benutzer</th>
|
||||||
|
<th>Mandant</th>
|
||||||
|
<th>Ausstellungsdatum</th>
|
||||||
|
<th>Ablaufdatum</th>
|
||||||
|
<th>Aktiv</th>
|
||||||
|
</tr>
|
||||||
|
<?= load_contact_list($input_id);?>
|
||||||
|
</table>
|
||||||
28
module/certificate/certificate_listform.inc.php
Normal file
28
module/certificate/certificate_listform.inc.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_certificate_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
?>
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new', true)"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<?php echo current_website_language($site, $language); ?>
|
||||||
|
<h1><?php echo get_translation('top_certificate'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||||
|
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT id, title AS '" . $translation->get("name") . "', description AS '" . $translation->get("description") . "' FROM main_certificate";
|
||||||
|
$format = array("option", "text", "text");
|
||||||
|
if ($result = mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, "form_certificate_list", $format);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
114
module/certificate/old_show_certificate.inc.php
Normal file
114
module/certificate/old_show_certificate.inc.php
Normal file
File diff suppressed because one or more lines are too long
81
module/certificate/show_certificate.inc.php
Normal file
81
module/certificate/show_certificate.inc.php
Normal file
File diff suppressed because one or more lines are too long
68
module/collection/#edit_collection_cardform_new.inc.php
Normal file
68
module/collection/#edit_collection_cardform_new.inc.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_cardform_new";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
|
||||||
|
// erstelle kollektionen sammeln
|
||||||
|
$collection_setups = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function create_new_collection( _id ) {
|
||||||
|
$('.main_collection_setup_id', $('#<?php echo $formname; ?>')).val(_id);
|
||||||
|
loadCard('save_collection', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php
|
||||||
|
echo $translation->get("new_collection");
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (count($collection_setups) == 0) {
|
||||||
|
|
||||||
|
// Wenn keine Kollektionseinstellungen angelegt wurden, dann nicht weiter machen
|
||||||
|
|
||||||
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div>";
|
||||||
|
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<form id="<?php echo $formname; ?>" name="<?php echo $formname; ?>" method="post">
|
||||||
|
<input name="input_collection_id" type="hidden" value="">
|
||||||
|
<input name="main_collection_setup_id" class="main_collection_setup_id" type="hidden" value="" />
|
||||||
|
<input name="firstsave" value="1" type="hidden" />
|
||||||
|
|
||||||
|
<div id="srollerInhalteHeadline"><h2><?php echo $translation->get("choose_collection_type"); ?></h2></div>
|
||||||
|
<div id="pagecontentScroller" class="pagecontentScroller">
|
||||||
|
<div class="scroller_inhalte">
|
||||||
|
|
||||||
|
<ul class="inhalte_menu new_collection">
|
||||||
|
<?php
|
||||||
|
foreach ($collection_setups as $collectionId => $collectionData) {
|
||||||
|
button("inhalt_collection_setup", '<img src="' . PATH_SETUP_ICON_COLLECTION . $collectionData['icon'] . '" /><span>' . $collectionData['description'] . '</span>', 'form_collection_cardform_new', "create_new_collection({$collectionId})");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
14
module/collection/collection.php
Normal file
14
module/collection/collection.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
require_once("collection_config.inc.php");
|
||||||
|
|
||||||
|
function collection_show() {
|
||||||
|
require("show_collection.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
function collection_edit() {
|
||||||
|
require_once('edit_collection.inc.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
function collection_edit_setup() {
|
||||||
|
require_once('edit_collection_setup.inc.php');
|
||||||
|
}
|
||||||
84
module/collection/collection_config.inc.php
Normal file
84
module/collection/collection_config.inc.php
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?
|
||||||
|
//Bildpfade
|
||||||
|
define("PATH_ORIGINAL_PICTURE_COLLECTION", "../../userdata/collection/original/");
|
||||||
|
define("PATH_RESIZE_COLLECTION", "../../userdata/collection/resize/");
|
||||||
|
define("PATH_ICON_COLLECTION", "/userdata/collection/icon/");
|
||||||
|
define("PATH_ORIGINAL_FRONTEND_COLLECTION", "/userdata/collection/resize/");
|
||||||
|
define("PATH_THUMB_FRONTEND_COLLECTION", "/userdata/collection/thumbnail/");
|
||||||
|
|
||||||
|
// kollektionsbilder
|
||||||
|
define("PATH_SETUP_ICON_COLLECTION", "/layout/admin/img/icons/collections/");
|
||||||
|
|
||||||
|
$collection_setup_images = array(
|
||||||
|
'artikel.png',
|
||||||
|
'bilder.png',
|
||||||
|
'calendar.png',
|
||||||
|
'dokumente_2.png',
|
||||||
|
'dokumente.png',
|
||||||
|
'karriere.png',
|
||||||
|
'liste.png',
|
||||||
|
'news.png',
|
||||||
|
'newsletter.png',
|
||||||
|
'orte.png',
|
||||||
|
'person.png',
|
||||||
|
'videos.png'
|
||||||
|
);
|
||||||
|
|
||||||
|
$collection_icon_images = array(
|
||||||
|
"ankuendigung" => array(
|
||||||
|
"" => array(
|
||||||
|
"name" => "Keine",
|
||||||
|
"image" => ''
|
||||||
|
),
|
||||||
|
|
||||||
|
"allgemeine info" => array(
|
||||||
|
"name" => "Allgemeine Info",
|
||||||
|
"image" => '<svg xmlns="http://www.w3.org/2000/svg" width="33" height="33" viewBox="0 0 33 33">
|
||||||
|
<path id="info" d="M19.5,32.7A13.2,13.2,0,1,0,6.3,19.5,13.2,13.2,0,0,0,19.5,32.7Zm0,3.3A16.5,16.5,0,1,1,36,19.5,16.5,16.5,0,0,1,19.5,36ZM17.85,17.85v9.9h3.3v-9.9Zm0-6.6h3.3v3.3h-3.3Z" transform="translate(-3 -3)"/>
|
||||||
|
</svg>'
|
||||||
|
),
|
||||||
|
|
||||||
|
"technisches Problem" => array(
|
||||||
|
"name" => "Technisches Problem",
|
||||||
|
"image" => '<svg xmlns="http://www.w3.org/2000/svg" width="33" height="25.85" viewBox="0 0 33 25.85">
|
||||||
|
<path id="devices" d="M32.474,16.1h-3.3V8.4a1.651,1.651,0,0,0-1.65-1.65H2.775A1.651,1.651,0,0,0,1.125,8.4V25.312a1.651,1.651,0,0,0,1.65,1.65H14.6V30.4H10.475v2.2h10.45V30.4H16.8V26.962h6.325V30.95a1.651,1.651,0,0,0,1.65,1.65h7.7a1.651,1.651,0,0,0,1.65-1.65v-13.2a1.651,1.651,0,0,0-1.65-1.65Zm-9.35,1.65v7.012H3.325V8.95H26.974V16.1h-2.2A1.651,1.651,0,0,0,23.124,17.75Zm8.8,12.65h-6.6V18.3h6.6Z" transform="translate(-1.125 -6.75)"/>
|
||||||
|
</svg>'
|
||||||
|
),
|
||||||
|
|
||||||
|
"wartung" => array(
|
||||||
|
"name" => "Wartung",
|
||||||
|
"image" => '<svg xmlns="http://www.w3.org/2000/svg" width="31.198" height="32.043" viewBox="0 0 31.198 32.043">
|
||||||
|
<g id="settings" transform="translate(-2.715 -2.295)">
|
||||||
|
<path id="Pfad_11458" data-name="Pfad 11458" d="M30.932,19.188V17.433l2.2-1.928a2.3,2.3,0,0,0,.436-2.927L30.862,7.987a2.314,2.314,0,0,0-2.72-1.032L25.354,7.9a13.026,13.026,0,0,0-1.5-.861l-.586-2.892a2.3,2.3,0,0,0-2.3-1.847H15.6a2.3,2.3,0,0,0-2.3,1.847l-.586,2.892A13.175,13.175,0,0,0,11.2,7.9L8.472,6.908a2.3,2.3,0,0,0-.733-.068A2.3,2.3,0,0,0,5.753,7.987L3.045,12.578a2.3,2.3,0,0,0,.47,2.881l2.169,1.985V19.2L3.515,21.128a2.3,2.3,0,0,0-.47,2.927l2.708,4.591a2.314,2.314,0,0,0,2.72,1.032l2.789-.941a13.026,13.026,0,0,0,1.5.861l.586,2.892a2.3,2.3,0,0,0,2.3,1.847h5.417a2.3,2.3,0,0,0,2.3-1.847l.586-2.892a13.175,13.175,0,0,0,1.515-.861l2.778.941a2.314,2.314,0,0,0,2.72-1.032l2.617-4.591a2.3,2.3,0,0,0-.47-2.881ZM28.877,27.5,24.94,26.166a10.168,10.168,0,0,1-3.11,1.8l-.814,4.12H15.6l-.815-4.074a10.742,10.742,0,0,1-3.1-1.8L7.738,27.5,5.03,22.907l3.122-2.754a10.214,10.214,0,0,1,0-3.592L5.03,13.726,7.738,9.135l3.937,1.331a10.168,10.168,0,0,1,3.11-1.8l.814-4.12h5.417l.815,4.074a10.742,10.742,0,0,1,3.1,1.8l3.947-1.285,2.708,4.591L28.464,16.48a10.214,10.214,0,0,1,0,3.592l3.122,2.835Z"/>
|
||||||
|
<path id="Pfad_11459" data-name="Pfad 11459" d="M18.136,25.022a6.817,6.817,0,1,1,4.889-2A6.886,6.886,0,0,1,18.136,25.022Zm0-11.476a4.488,4.488,0,0,0-4.591,4.591,4.488,4.488,0,0,0,4.591,4.591,4.488,4.488,0,0,0,4.591-4.591,4.488,4.488,0,0,0-4.591-4.591Z" transform="translate(0.172 0.18)"/>
|
||||||
|
</g>
|
||||||
|
</svg>'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
"highlight" => array(
|
||||||
|
"" => array(
|
||||||
|
"name" => "Keine",
|
||||||
|
"image" => ''
|
||||||
|
),
|
||||||
|
|
||||||
|
"projekt des monats" => array(
|
||||||
|
"name" => "Projekt des Monats",
|
||||||
|
"image" => '<svg xmlns="http://www.w3.org/2000/svg" width="54.344" height="54.344" viewBox="0 0 54.344 54.344">
|
||||||
|
<path id="trophy" d="M54.344,16.982A16.967,16.967,0,0,1,45.88,31.71a16.7,16.7,0,0,1-8.518,2.255h-1.7q-5.095,2.282-5.095,6.793,0,5.413,4.246,7.377a17.676,17.676,0,0,1,4.352,1.221q1.593.744,1.593,1.593,0,1.433-3.981,2.415a40.517,40.517,0,0,1-9.607.98,40.861,40.861,0,0,1-9.605-.981q-3.979-.978-3.981-2.415,0-.85,1.593-1.593a17.765,17.765,0,0,1,4.352-1.221q4.246-1.964,4.246-7.377,0-4.511-5.095-6.793h-1.7A16.926,16.926,0,0,1,0,16.982a14.267,14.267,0,0,1,2.787-8.81,15.2,15.2,0,0,1,7.456-5.308Q10.189,1.22,10.189,0H44.154q0,1.274-.053,2.865a15.186,15.186,0,0,1,7.456,5.308A14.28,14.28,0,0,1,54.344,16.982ZM10.879,9.977a7.505,7.505,0,0,0-4.086,7.006,9.778,9.778,0,0,0,2.839,7.031,9.766,9.766,0,0,0,6.873,3.105Q12.366,20.7,10.879,9.978Zm19.371.266L27.172,3.4l-3.078,6.846-7.111.956,5.253,5.148-1.38,7.43,6.316-3.609,6.316,3.609-1.38-7.43L37.361,11.2Zm13.215-.266Q41.979,20.7,37.838,27.118a9.757,9.757,0,0,0,6.873-3.105,9.78,9.78,0,0,0,2.839-7.03A7.505,7.505,0,0,0,43.464,9.977Z" fill="#fff"/>
|
||||||
|
</svg>'
|
||||||
|
),
|
||||||
|
|
||||||
|
"job des monats" => array(
|
||||||
|
"name" => "Job des Monats",
|
||||||
|
"image" => '<svg xmlns="http://www.w3.org/2000/svg" width="52.01" height="52.012" viewBox="0 0 52.01 52.012">
|
||||||
|
<g id="rocket" transform="translate(-2.251 -2.251)">
|
||||||
|
<path id="Pfad_11401" data-name="Pfad 11401" d="M24.344,11.024a3.1,3.1,0,1,0,2.191.907,3.1,3.1,0,0,0-2.191-.907Z" transform="translate(12.369 5.713)" fill="#fff"/>
|
||||||
|
<path id="Pfad_11402" data-name="Pfad 11402" d="M53.965,4.347a.033.033,0,0,1,0-.01A2.368,2.368,0,0,0,52.208,2.56c-3.459-.844-8.9.056-14.933,2.47a48.038,48.038,0,0,0-15.625,9.894,37.233,37.233,0,0,0-3.431,3.928,15.208,15.208,0,0,0-6.8,1.093c-6.7,2.951-8.618,10.5-9.128,13.6a2.9,2.9,0,0,0,3.157,3.367h.015l7.467-.816c.01.1.02.182.028.263a3.989,3.989,0,0,0,1.149,2.406l3.644,3.647a3.979,3.979,0,0,0,2.4,1.151l.249.026-.812,7.458v.015a2.882,2.882,0,0,0,3.34,3.16c3.117-.5,10.663-2.393,13.606-9.133a15.347,15.347,0,0,0,1.1-6.773,36.545,36.545,0,0,0,3.941-3.431,47.677,47.677,0,0,0,9.9-15.5c2.4-5.962,3.306-11.446,2.483-15.039Zm-12.43,20.3a6.768,6.768,0,1,1,2.019-4.822A6.823,6.823,0,0,1,41.535,24.65Z" transform="translate(0)" fill="#fff"/>
|
||||||
|
<path id="Pfad_11403" data-name="Pfad 11403" d="M16.6,29.482a1.858,1.858,0,0,0-1.276.31c-.741.507-1.488,1.009-2.239,1.5a1.733,1.733,0,0,1-2.439-2.322l1.41-2.439a1.858,1.858,0,0,0-1.76-2.891,7.112,7.112,0,0,0-4.136,2.026c-.424.426-1.717,1.719-2.412,6.648a41.557,41.557,0,0,0-.375,4.268,1.858,1.858,0,0,0,1.858,1.906h.046a41.783,41.783,0,0,0,4.272-.372c4.93-.7,6.223-1.99,6.649-2.416a7.023,7.023,0,0,0,2.019-4.149A1.858,1.858,0,0,0,16.6,29.48Z" transform="translate(0.732 13.919)" fill="#fff"/>
|
||||||
|
</g>
|
||||||
|
</svg>'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
);
|
||||||
17
module/collection/collection_contact_form_option.inc.php
Normal file
17
module/collection/collection_contact_form_option.inc.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$query = "SELECT * FROM contactform_header WHERE id = ".$fieldSetup['option_string'];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$row = @mysqli_fetch_array($result);
|
||||||
|
?>
|
||||||
|
<h2><?php echo $translation->get("contactform_options"); ?> : <?= $row['description']; ?></h2>
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<input type="hidden" name="header_id<?=$fieldSetup['id']?>" value="<?=$fieldSetup['option_string']?>">
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("recipient_name"), "receiver_name".$fieldSetup['id'], "text", isset($dataLinked["receiver_name"]) ? $dataLinked["receiver_name"] : $row['recipient_name'], 255) ?>
|
||||||
|
<? input($translation->get("recipient_email"), "receiver_email".$fieldSetup['id'], "text", isset($dataLinked["receiver_email"]) ? $dataLinked["receiver_email"] : $row['recipient_email'], 255) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
17
module/collection/collections.xml
Normal file
17
module/collection/collections.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<collections>
|
||||||
|
<collection_setup id="30">
|
||||||
|
<collection id="143">
|
||||||
|
<description>Slideshow wird ohne Inhalt ausgeblendet</description>
|
||||||
|
<headline>Slideshow wird ohne Inhalt ausgeblendet</headline>
|
||||||
|
</collection>
|
||||||
|
<collection id="144">
|
||||||
|
<description>Slideshow wird ohne Inhalt ausgeblendet</description>
|
||||||
|
<headline>Slideshow wird ohne Inhalt ausgeblendet</headline>
|
||||||
|
</collection>
|
||||||
|
<collection id="145">
|
||||||
|
<description>Slideshow wird ohne Inhalt ausgeblendet</description>
|
||||||
|
<headline>Slideshow wird ohne Inhalt ausgeblendet</headline>
|
||||||
|
</collection>
|
||||||
|
</collection_setup>
|
||||||
|
</collections>
|
||||||
197
module/collection/component_collection_preview_cardform.inc.php
Normal file
197
module/collection/component_collection_preview_cardform.inc.php
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_preview_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
$collection_setup_id = 0;
|
||||||
|
|
||||||
|
// erstelle kollektionen sammeln
|
||||||
|
$collection_setups = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
$query = "SELECT ms.id, ms.main_language_id, ms.code, ms.description, ms.linked, ms.icon, ms.modified_user, ms.modified_date, ms.all_languages, ms.show_filter FROM main_collection_setup as ms INNER JOIN main_collection_setup_websites as mcsw on ms.id = mcsw.main_collection_setup_id WHERE mcsw.main_site_id = ".$GLOBALS['site']['id']." AND ms.is_multidomain = 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
if ($input_line['main_collection_setup_id'] != "") {
|
||||||
|
$query = "SELECT * FROM main_collection WHERE main_collection_setup_id = '" . $input_line['main_collection_setup_id'] . "' AND main_language_id = '" . $GLOBALS["language"]['id']."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$active_groups = array();
|
||||||
|
$query = "SELECT main_collection_setup_group_id FROM main_component_collection_group_link WHERE main_component_link_id = '" . (int)$input_line["id"]."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result)) {
|
||||||
|
$active_groups[] = $row['main_collection_setup_group_id'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadPagesWithCollection( collection_setup_id ) {
|
||||||
|
load_collections(collection_setup_id);
|
||||||
|
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
if (collection_setup_id == "" || collection_setup_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).show();
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("collection_setup_id", collection_setup_id);
|
||||||
|
formData.append("component_link_id", '<?php echo $input_line["id"]; ?>');
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collection_pages_page",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html(output.page_with_collection_select);
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname; ?>')).html(output.collection_preview_group_select);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataType : 'json'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collections( collection_setup_id ) {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("main_collection_setup_id", collection_setup_id);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collections_page",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggle_view_type( _type ) {
|
||||||
|
if (_type == 0) {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).show();
|
||||||
|
$('.collection_items_choose', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
$('.collection_items_choose', $('#<?php echo $formname; ?>')).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_and_close_page_line() {
|
||||||
|
jQuery('#save_and_close', jQuery('#<?php echo $formname; ?>')).val("1");
|
||||||
|
loadCard('save_collection_preview_page', true);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php echo $translation->get("assign_collection_preview"); ?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("left", $translation->get("overview"), $formname, "loadCard('edit_component', true)"); ?>
|
||||||
|
|
||||||
|
<?= button("save", $translation->get("save"), $formname, "loadCard('save_collection_preview_page', true)"); ?>
|
||||||
|
<?= button("save", $translation->get("save_and_close"), $formname, "save_and_close_page_line();"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_line["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="0" />
|
||||||
|
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? create_collection_select($collection_setups, $translation->get("choose_collection_type"), "main_collection_setup_id", $input_line, FALSE, TRUE, "loadPagesWithCollection(this.value);"); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<? input_select($translation->get("collection_preview_type"), "main_collection_view_type", $values = array('0', '1'), $value_names = array($translation->get("single_collection"), $translation->get("collection_list")), $input_line["main_collection_view_type"], FALSE, FALSE, 'onchange="toggle_view_type(this.value);"'); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
|
||||||
|
<div class="collection_pages">
|
||||||
|
<?
|
||||||
|
create_page_with_collection_select($input_line['main_collection_setup_id'], $translation->get("page_with_collections"), "main_collection_page_list_id", $input_line, FALSE);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_line["main_collection_view_type"] == 0) {
|
||||||
|
$display_list_choose = '';
|
||||||
|
$display_item_choose = 'style="display:none;"';
|
||||||
|
} else {
|
||||||
|
$display_item_choose = '';
|
||||||
|
$display_list_choose = 'style="display:none;"';
|
||||||
|
}
|
||||||
|
|
||||||
|
// einzelne kollektion
|
||||||
|
echo "<div class=\"collection_list_choose\" " . $display_list_choose . ">";
|
||||||
|
input_select($translation->get("choose_collection"), "main_collection_id", $values = $collection_ids, $value_names = $collections, $input_line["main_collection_id"], FALSE, FALSE);
|
||||||
|
echo "</div>";
|
||||||
|
|
||||||
|
// kollektionsliste
|
||||||
|
echo "<div class=\"collection_items_choose\" " . $display_item_choose . ">";
|
||||||
|
input($translation->get("collection_list_items"), "main_collection_items", "text", $input_line["main_collection_items"], 255);
|
||||||
|
echo "</div>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="collection_preview_group_select_container">
|
||||||
|
<?php create_collection_preview_group_select($input_line['main_collection_setup_id'], $input_line["id"], $active_groups); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
301
module/collection/contact_collection_preview_cardform.inc.php
Normal file
301
module/collection/contact_collection_preview_cardform.inc.php
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_preview_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_contactform_id = (isset($_REQUEST["input_contactform_id"]) ? $_REQUEST["input_contactform_id"] : "");
|
||||||
|
$collection_setup_id = 0;
|
||||||
|
|
||||||
|
// erstelle kollektionen sammeln
|
||||||
|
$collection_setups = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT ms.id, ms.main_language_id, ms.code, ms.description, ms.linked, ms.icon, ms.modified_user, ms.modified_date, ms.all_languages, ms.show_filter FROM main_collection_setup as ms INNER JOIN main_collection_setup_websites as mcsw on ms.id = mcsw.main_collection_setup_id WHERE mcsw.main_site_id = ".$GLOBALS['site']['id']." ";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
if ($input_line['main_collection_setup_id'] != "") {
|
||||||
|
$query = "SELECT * FROM main_collection WHERE main_collection_setup_id = " . $input_line['main_collection_setup_id'];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$active_groups = array();
|
||||||
|
$query = "SELECT main_collection_setup_group_id FROM main_page_collection_group_link WHERE main_page_link_id = " . (int)$input_line["id"];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result)) {
|
||||||
|
$active_groups[] = $row['main_collection_setup_group_id'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadPagesWithCollection( collection_setup_id ) {
|
||||||
|
load_collections(collection_setup_id);
|
||||||
|
console.log('hello');
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
if (collection_setup_id == "" || collection_setup_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).show();
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("collection_setup_id", collection_setup_id);
|
||||||
|
formData.append("page_link_id", '<?php echo $input_line["id"]; ?>');
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collection_pages_page",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
dataType : 'json',
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/dc/");
|
||||||
|
} else {
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
console.log('history');
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html(output.page_with_collection_select);
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname; ?>')).html(output.collection_preview_group_select);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, exception) {
|
||||||
|
var msg = '';
|
||||||
|
if (jqXHR.status === 0) {
|
||||||
|
msg = 'Not connect.\n Verify Network.';
|
||||||
|
} else if (jqXHR.status == 404) {
|
||||||
|
msg = 'Requested page not found. [404]';
|
||||||
|
} else if (jqXHR.status == 500) {
|
||||||
|
msg = 'Internal Server Error [500].';
|
||||||
|
} else if (exception === 'parsererror') {
|
||||||
|
msg = 'Requested JSON parse failed.';
|
||||||
|
} else if (exception === 'timeout') {
|
||||||
|
msg = 'Time out error.';
|
||||||
|
} else if (exception === 'abort') {
|
||||||
|
msg = 'Ajax request aborted.';
|
||||||
|
} else {
|
||||||
|
msg = 'Uncaught Error.\n' + jqXHR.responseText;
|
||||||
|
}
|
||||||
|
console.log(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collections( collection_setup_id ) {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("main_collection_setup_id", collection_setup_id);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collections_page",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/dc/");
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggle_view_type( _type ) {
|
||||||
|
if (_type == 0) {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).show();
|
||||||
|
$('.collection_items_choose', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
$('.collection_items_choose', $('#<?php echo $formname; ?>')).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_and_close_page_line() {
|
||||||
|
jQuery('#save_and_close', jQuery('#<?php echo $formname; ?>')).val("1");
|
||||||
|
loadCard('save_collection_preview_page', true);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php
|
||||||
|
if (isset($_REQUEST['is_collection_preview']) && $_REQUEST['is_collection_preview'] == 1) {
|
||||||
|
echo $translation->get("assign_collection_preview");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("assign_collection_list");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("left", $translation->get("back"), $formname, "loadCard('edit_contactform', true)"); ?>
|
||||||
|
|
||||||
|
<?= button("save", $translation->get("save"), $formname, "loadCard('save_collection_preview_page', true)"); ?>
|
||||||
|
<?= button("delete",$translation->get("delete_content"),$formname,"loadCard('delete_line_contact', true, '{$translation->get('delete_assoc_pageline')}')","", false); ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
if ($messages !== null) {
|
||||||
|
if ((gettype($messages) == 'array' || gettype($messages) == 'object') && count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if (isset($_REQUEST['is_collection_preview']) && $_REQUEST['is_collection_preview'] == 1): ?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_line["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="0" />
|
||||||
|
<input type="hidden" name="input_contactform_id" value="<?php echo $input_contactform_id; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
<input name="is_collection_preview" id="is_collection_preview" type="hidden" value="1" />
|
||||||
|
<input type="hidden" name="input_section_id" value="<?php echo $_REQUEST['input_section_id']; ?>" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? layout_class_select($translation->get("layout_area"), "input_layout_area_id", $input_line['layout_area_id']); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? create_collection_select($collection_setups, $translation->get("choose_collection_type"), "main_collection_setup_id", $input_line, FALSE, TRUE, "loadPagesWithCollection(this.value);"); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<? input_select($translation->get("collection_preview_type"), "main_collection_view_type", $values = array('0', '1'), $value_names = array($translation->get("single_collection"), $translation->get("collection_list")), $input_line["main_collection_view_type"], FALSE, FALSE, 'onchange="toggle_view_type(this.value);"'); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
|
||||||
|
<div class="collection_pages">
|
||||||
|
<?
|
||||||
|
create_page_with_collection_select($input_line['main_collection_setup_id'], $translation->get("page_with_collections"), "main_collection_page_list_id", $input_line, FALSE);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_line["main_collection_view_type"] == 0) {
|
||||||
|
$display_list_choose = '';
|
||||||
|
$display_item_choose = 'style="display:none;"';
|
||||||
|
} else {
|
||||||
|
$display_item_choose = '';
|
||||||
|
$display_list_choose = 'style="display:none;"';
|
||||||
|
}
|
||||||
|
|
||||||
|
// einzelne kollektion
|
||||||
|
echo "<div class=\"collection_list_choose\" " . $display_list_choose . ">";
|
||||||
|
input_select($translation->get("choose_collection"), "main_collection_id", $values = $collection_ids, $value_names = $collections, $input_line["main_collection_id"], FALSE, FALSE);
|
||||||
|
echo "</div>";
|
||||||
|
|
||||||
|
// kollektionsliste
|
||||||
|
echo "<div class=\"collection_items_choose\" " . $display_item_choose . ">";
|
||||||
|
input($translation->get("collection_list_items"), "main_collection_items", "text", $input_line["main_collection_items"], 255);
|
||||||
|
echo "</div>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("active"), "input_active", "checkbox", $input_line['active']); ?>
|
||||||
|
<? input($translation->get("self_definded_class"), "layout_class_defined", "text", $input_line["layout_class_defined"], 50) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="collection_preview_group_select_container">
|
||||||
|
<?php create_collection_preview_group_select($input_line['main_collection_setup_id'], $input_line["id"], $active_groups); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_line["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="0" />
|
||||||
|
<input type="hidden" name="input_contactform_id" value="<?php echo $input_contactform_id; ?>" />
|
||||||
|
<input type="hidden" name="input_section_id" value="<?php echo $_REQUEST['input_section_id']; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
<input name="is_collection_list" id="is_collection_list" type="hidden" value="1" />
|
||||||
|
|
||||||
|
<input name="main_collection_id" type="hidden" value="0" />
|
||||||
|
<input name="main_collection_page_list_id" type="hidden" value="0" />
|
||||||
|
<input name="main_collection_items" type="hidden" value="0" />
|
||||||
|
<input name="main_collection_view_type" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? layout_class_select($translation->get("layout_area"), "input_layout_area_id", $input_line['layout_area_id']); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? create_collection_select($collection_setups, $translation->get("choose_collection_type"), "main_collection_setup_id", $input_line, FALSE, TRUE, "loadPagesWithCollection(this.value);"); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("active"), "input_active", "checkbox", $input_line['active']); ?>
|
||||||
|
<? input($translation->get("self_definded_class"), "layout_class_defined", "text", $input_line["layout_class_defined"], 50) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="collection_preview_group_select_container">
|
||||||
|
<?php create_collection_preview_group_select($input_line['main_collection_setup_id'], $input_line["id"], $active_groups); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
309
module/collection/custom_collection_functions.inc.php
Normal file
309
module/collection/custom_collection_functions.inc.php
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
<?php
|
||||||
|
function new_line_collection_setup() {
|
||||||
|
$input_line = array(
|
||||||
|
'fieldtype' => $_POST['fieldtype'],
|
||||||
|
'type_id' => $_POST['type_id'],
|
||||||
|
);
|
||||||
|
|
||||||
|
require_once("edit_collection_custom_setup_line_cardform.inc.php");
|
||||||
|
}
|
||||||
|
function load_sitepart_form() {
|
||||||
|
$collectionTypes = \DynCom\mysyde\common\classes\CollectionTypes::get();
|
||||||
|
|
||||||
|
$code = $collectionTypes[$_POST['sitepartid']]['code'];
|
||||||
|
|
||||||
|
$include = MODULE_PATH . "collection/edit_collection_" . $code . "_config.inc.php";
|
||||||
|
if (file_exists($include)) {
|
||||||
|
require_once($include);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function save_line_collection_setup() {
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$messages = array();
|
||||||
|
$id = $_REQUEST["input_line_id"];
|
||||||
|
$is_teaser = ($_POST["main_input_is_teaser"] == "on") ? 1 : 0;
|
||||||
|
$is_bulletlist = ($_POST["main_input_is_bulletlist"] == "on") ? 1 : 0;
|
||||||
|
$show_description_title = ($_POST["main_input_show_description_title"] == "on") ? 1 : 0;
|
||||||
|
$mandatory = ($_POST["main_input_mandatory"] == "on") ? 1 : 0;
|
||||||
|
$main_collection_id = $_POST['collection_id'];
|
||||||
|
$options = array();
|
||||||
|
// echo '<pre>';print_r($_POST);exit;
|
||||||
|
foreach ($_POST as $key => $value) {
|
||||||
|
if (substr($key, 0, 16) == 'collection_setup') {
|
||||||
|
$options[$key] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$serialize_options = serialize($options);
|
||||||
|
|
||||||
|
if ($_REQUEST["input_line_id"] <> '') {
|
||||||
|
$query = "UPDATE main_collection_setup_content SET
|
||||||
|
fieldtype = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["collection_type"]) . "',
|
||||||
|
note = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_note"]) . "',
|
||||||
|
input_maxlength = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_maxlength"]) . "',
|
||||||
|
fieldname = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_description"]) . "',
|
||||||
|
code = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_code"]) . "',
|
||||||
|
is_teaser = " . $is_teaser . ",
|
||||||
|
is_bulletlist = " . $is_bulletlist . ",
|
||||||
|
show_description_title = " . $show_description_title . ",
|
||||||
|
mandatory = " . $mandatory . ",
|
||||||
|
option_string = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_option_string"]) . "',
|
||||||
|
type_id = '" . (int)$_REQUEST['main_input_choose_type'] . "',
|
||||||
|
options = '" . $serialize_options . "',
|
||||||
|
main_collection_id = '".$main_collection_id."'
|
||||||
|
WHERE id = '" . $_REQUEST["input_line_id"] . "' LIMIT 1";
|
||||||
|
$inserted = FALSE;
|
||||||
|
} else {
|
||||||
|
$_REQUEST["main_input_code"] = "field-".time();
|
||||||
|
$sorting = @mysqli_fetch_array(@mysqli_query($GLOBALS['mysql_con'], "SELECT MAX(sorting)+1 AS 'newsorting' FROM main_collection_setup_content WHERE main_collection_setup_id = '" . $_REQUEST["input_id"]."'"));
|
||||||
|
$sorting = ($sorting["newsorting"] <> "") ? $sorting = $sorting["newsorting"] : $sorting = 1;
|
||||||
|
$query = "INSERT INTO main_collection_setup_content (main_collection_setup_id, fieldtype, note, input_maxlength, fieldname, code, is_teaser, is_bulletlist, show_description_title, mandatory, option_string, type_id, options, sorting, main_collection_id) VALUES (
|
||||||
|
'" . (int)$_REQUEST["input_id"] . "',
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["collection_type"]) . "',
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_note"]) . "',
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_maxlength"]) . "',
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_description"]) . "',
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_code"]) . "',
|
||||||
|
" . $is_teaser . ",
|
||||||
|
" . $is_bulletlist . ",
|
||||||
|
" . $show_description_title . ",
|
||||||
|
" . $mandatory . ",
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["main_input_option_string"]) . "',
|
||||||
|
'" . (int)$_REQUEST['main_input_choose_type'] . "',
|
||||||
|
'" . $serialize_options . "',
|
||||||
|
" . $sorting . ",
|
||||||
|
" .$main_collection_id . "
|
||||||
|
)";
|
||||||
|
|
||||||
|
$inserted = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($_REQUEST["main_input_choose_type"] == '') | ($_REQUEST["main_input_choose_type"] == 0)) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_choose_inputtype") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($_REQUEST["main_input_code"] == '') | ($_REQUEST["main_input_description"] == '')) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_textkey_description") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST["main_input_code"] <> urlencode($_REQUEST["main_input_code"])) {
|
||||||
|
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_textkey_encoding") . "</div>\n";
|
||||||
|
$error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// benoetigt fuer ajax calls
|
||||||
|
if ($error === TRUE) {
|
||||||
|
header('EDIT_ERROR: 1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if ($inserted === FALSE) {
|
||||||
|
update_sitepart_setup($options, $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['save_and_close'] == 1) {
|
||||||
|
|
||||||
|
edit_collection_setup();
|
||||||
|
} else {
|
||||||
|
if ($inserted === TRUE) {
|
||||||
|
$id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("collection_line_msg_success1") . '</div>';
|
||||||
|
} else {
|
||||||
|
$messages[] = '<div class="successbox">' . $translation->get("collection_line_msg_success2") . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_line_collection_setup($id, $messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$input_line["id"] = $_REQUEST["input_line_id"];
|
||||||
|
$input_line["is_teaser"] = $_REQUEST["main_input_is_teaser"];
|
||||||
|
$input_line["fieldname"] = $_REQUEST["main_input_description"];
|
||||||
|
$input_line["fieldtype"] = $_REQUEST["collection_type"];
|
||||||
|
$input_line['type_id'] = $_REQUEST["main_input_choose_type"];
|
||||||
|
$input_line["code"] = $_REQUEST["main_input_code"];
|
||||||
|
$input_line['options'] = $serialize_options;
|
||||||
|
require_once("edit_collection_custom_setup_line_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function update_sitepart_setup( $options, $setup_content_id ) {
|
||||||
|
if ($_REQUEST["collection_type"] != "siteparts") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sitepartId = (int)$_REQUEST['main_input_choose_type'];
|
||||||
|
|
||||||
|
$query = "SELECT main_sitepart_header_id FROM main_collection_link WHERE main_collection_setup_content_id = '" . $setup_content_id . "' AND main_sitepart_id = '" . $sitepartId."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$sitepart_header_ids = array();
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$sitepart_header_ids[] = $row['main_sitepart_header_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($sitepart_header_ids) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch ($sitepartId) {
|
||||||
|
case 2:
|
||||||
|
update_sitepart_header_slideshow($options, $sitepart_header_ids);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
update_sitepart_header_contactform($options, $sitepart_header_ids);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
update_sitepart_header_gallery($options, $sitepart_header_ids);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
update_sitepart_header_magicscroll($options, $sitepart_header_ids);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
update_sitepart_header_googlemaps($options, $sitepart_header_ids);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function update_sitepart_header_slideshow( $options, $sitepart_header_ids ) {
|
||||||
|
$query = "UPDATE slideshow_header SET
|
||||||
|
|
||||||
|
width = " . (int)$options['collection_setup_width'] . ",
|
||||||
|
height = " . (int)$options['collection_setup_height'] . ",
|
||||||
|
effect = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options['collection_setup_effect']) . "',
|
||||||
|
arrows = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options['collection_setup_arrows']) . "',
|
||||||
|
eff_interval = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options['collection_setup_eff_interval']) . "',
|
||||||
|
effect_duration = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options['collection_setup_effect_duration']) . "',
|
||||||
|
text_effect = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options['collection_setup_text_effect']) . "',
|
||||||
|
text_pos = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options['collection_setup_text_pos']) . "'
|
||||||
|
|
||||||
|
WHERE id IN (" . join(',', $sitepart_header_ids) . ")";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_sitepart_header_contactform( $options, $sitepart_header_ids ) {
|
||||||
|
$query = "UPDATE contactform_header SET
|
||||||
|
|
||||||
|
sender_name = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_sender_name"]) . "',
|
||||||
|
sender_email = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_sender_email"]) . "',
|
||||||
|
recipient_name = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_recipient_name"]) . "',
|
||||||
|
recipient_email = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_recipient_email"]) . "',
|
||||||
|
subject = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_input_subject"]) . "'
|
||||||
|
|
||||||
|
WHERE id IN (" . join(',', $sitepart_header_ids) . ")";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_sitepart_header_gallery( $options, $sitepart_header_ids ) {
|
||||||
|
$query = "UPDATE gallery_header SET
|
||||||
|
|
||||||
|
width = " . (int)$options["collection_setup_gallery_width"] . ",
|
||||||
|
height = " . (int)$options["collection_setup_gallery_height"] . ",
|
||||||
|
thumb_width = " . (int)$options["collection_setup_gallery_thumb_width"] . ",
|
||||||
|
thumb_height = " . (int)$options["collection_setup_gallery_thumb_height"] . "
|
||||||
|
|
||||||
|
WHERE id IN (" . join(',', $sitepart_header_ids) . ")";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_sitepart_header_magicscroll( $options, $sitepart_header_ids ) {
|
||||||
|
$query = "UPDATE scrollbar_header SET
|
||||||
|
|
||||||
|
width = " . (int)$options["collection_setup_width"] . ",
|
||||||
|
height = " . (int)$options["collection_setup_height"] . ",
|
||||||
|
item_width = " . (int)$options["collection_setup_item_width"] . ",
|
||||||
|
item_height = " . (int)$options["collection_setup_item_height"] . ",
|
||||||
|
arrows = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_arrows"]) . "',
|
||||||
|
eff_interval = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_eff_interval"]) . "',
|
||||||
|
effect_duration = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_effect_duration"]) . "',
|
||||||
|
items = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_items"]) . "',
|
||||||
|
step = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_step"]) . "'
|
||||||
|
|
||||||
|
WHERE id IN (" . join(',', $sitepart_header_ids) . ")";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_sitepart_header_googlemaps( $options, $sitepart_header_ids ) {
|
||||||
|
$query = "UPDATE google_maps_header SET
|
||||||
|
|
||||||
|
width = " . (int)$options["collection_setup_google_maps_width"] . ",
|
||||||
|
height = " . (int)$options["collection_setup_google_maps_height"] . ",
|
||||||
|
icon_location = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $options["collection_setup_icon_location"]) . "'
|
||||||
|
|
||||||
|
WHERE id IN (" . join(',', $sitepart_header_ids) . ")";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
function edit_line_collection_setup( $_id = "", $messages = array() ) {
|
||||||
|
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$line_id = $_id;
|
||||||
|
} else {
|
||||||
|
$line_id = $_REQUEST["input_line_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($line_id <> '') {
|
||||||
|
|
||||||
|
$query = "SELECT * FROM main_collection_setup_content WHERE id = '" . $line_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
|
||||||
|
$input_line = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
require_once("edit_collection_custom_setup_line_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
require_once("edit_collection_custom_setup_line_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function edit_collection_setup( $_id = "", $messages = array() ) {
|
||||||
|
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$input_id = $_id;
|
||||||
|
} else {
|
||||||
|
$input_id = $_REQUEST["collection_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($input_id <> '') {
|
||||||
|
|
||||||
|
$query = "SELECT * FROM main_collection WHERE id = '" . $input_id . "' LIMIT 1";
|
||||||
|
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
|
||||||
|
$input_collection = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
require_once("edit_collection_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
require_once("edit_collection_cardform.inc.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function delete_line_collection_setup() {
|
||||||
|
|
||||||
|
if ($_REQUEST["input_line_id"] <> '') {
|
||||||
|
$query = "DELETE FROM main_collection_setup_content WHERE id = '" . $_REQUEST["input_line_id"]."'";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
edit_collection_setup();
|
||||||
|
}
|
||||||
|
function update_sortorder_collection_setup() {
|
||||||
|
$sorting = 1;
|
||||||
|
foreach ($_POST['linklistid'] as $itemId) {
|
||||||
|
$query = "UPDATE main_collection_setup_content SET sorting = " . $sorting . " WHERE id = '" . $itemId."'";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$sorting++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
129
module/collection/dashboard_collections.php
Normal file
129
module/collection/dashboard_collections.php
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<?php
|
||||||
|
require_once(MODULE_PATH . "collection/collection_config.inc.php");
|
||||||
|
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
$pageIds = array();
|
||||||
|
$sitepartCount = array();
|
||||||
|
$formname = "form_edit_collection";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
$action = (isset($_GET['action']) ? $_GET['action'] : "");
|
||||||
|
|
||||||
|
function countCollection($setup_id){
|
||||||
|
$query = "SELECT id FROM main_collection WHERE main_collection_setup_id = ".$setup_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
return $num_rows;
|
||||||
|
}
|
||||||
|
function loadWorlds(){
|
||||||
|
$query = "SELECT * FROM main_collection_setup_world ORDER BY sorting ASC";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
echo "<div class='pop-up-element'>";
|
||||||
|
$query_setup = "SELECT main_collection_setup.* FROM main_collection_setup LEFT JOIN main_collection_setup_worlds_link ON main_collection_setup_worlds_link.main_collection_setup_id = main_collection_setup.id WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) AND main_collection_setup_world_id = ".$row['id']." ORDER BY main_collection_setup.id ASC";
|
||||||
|
$result_setup = @mysqli_query($GLOBALS['mysql_con'], $query_setup);
|
||||||
|
while ($row_setup = @mysqli_fetch_array($result_setup, 1)) {
|
||||||
|
?>
|
||||||
|
<a class="dashoard_box button_inhalt_collection"
|
||||||
|
href="<?php echo get_menu_link($_GET["level_1"] . "/" . $row_setup['id'], $GLOBALS['site'], $GLOBALS['language']); ?>">
|
||||||
|
<span
|
||||||
|
class="dashboard_box_number"><?php echo countCollection($row_setup['id']); ?></span>
|
||||||
|
<span class="dashboard_box_description"><?php echo $row_setup['description']; ?></span>
|
||||||
|
<img
|
||||||
|
src="<?php echo PATH_SETUP_ICON_COLLECTION . ($row_setup['icon'] != "" ? $row_setup['icon'] : 'dokumente_2.png'); ?>" />
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function allCollections(){
|
||||||
|
echo "<div class='pop-up-element'>";
|
||||||
|
$query_setup = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) ORDER BY main_collection_setup.id ASC";
|
||||||
|
$result_setup = @mysqli_query($GLOBALS['mysql_con'], $query_setup);
|
||||||
|
while ($row_setup = @mysqli_fetch_array($result_setup, 1)) {
|
||||||
|
?>
|
||||||
|
<a class="dashoard_box button_inhalt_collection"
|
||||||
|
href="<?php echo get_menu_link($_GET["level_1"] . "/" . $row_setup['id'], $GLOBALS['site'], $GLOBALS['language']); ?>">
|
||||||
|
<span
|
||||||
|
class="dashboard_box_number"><?php echo countCollection($row_setup['id']); ?></span>
|
||||||
|
<span class="dashboard_box_description"><?php echo $row_setup['description']; ?></span>
|
||||||
|
<img
|
||||||
|
src="<?php echo PATH_SETUP_ICON_COLLECTION . ($row_setup['icon'] != "" ? $row_setup['icon'] : 'dokumente_2.png'); ?>" />
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadWorldButtons(){
|
||||||
|
$query = "SELECT * FROM main_collection_setup_world ORDER BY sorting ASC";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
echo "<div class='pop-up-button'>Alle</div>";
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
echo "<div class='pop-up-button'>".$row['description']."</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="mainContent" class="w-100">
|
||||||
|
<div class="collection-content dashboard-left-content">
|
||||||
|
<img class="mysyde-icon img-fluid"src="/layout/admin/img/icons/mysyde-icon.svg" alt="MySyde Icon">
|
||||||
|
<div class="text-content">
|
||||||
|
<div class="text-white"><?php echo current_website_language($site, $language); ?></div>
|
||||||
|
<h1 class="new-h1 text-white"><?php echo $translation->get("intranet_posts"); ?></h1>
|
||||||
|
<p class="text-white">Sie sind das Herz und die Niere einer jeden Content Welt</p>
|
||||||
|
</div>
|
||||||
|
<img src="/layout/admin/img/icons/mysyde-bg.jpg" alt="" class="module-content-img hintergrund module-hintergrund position-absolute top-0 left-0 z-index-1">
|
||||||
|
</div>
|
||||||
|
<div class="collection_overview">
|
||||||
|
<div class='collection_world_buttons'>
|
||||||
|
<?php loadWorldButtons(); ?>
|
||||||
|
</div>
|
||||||
|
<div class='collection_world_content'>
|
||||||
|
<?php allCollections();?>
|
||||||
|
<?php loadWorlds();?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// Popup Element automatisches öffnen
|
||||||
|
var popupButton = document.getElementsByClassName("pop-up-button");
|
||||||
|
for (let i = 0; i < popupButton.length; i++) {
|
||||||
|
popupButton[i].setAttribute("data-button", i);
|
||||||
|
}
|
||||||
|
|
||||||
|
var popupElement = document.getElementsByClassName("pop-up-element");
|
||||||
|
$(".pop-up-element").hide();
|
||||||
|
for (let i = 0; i < popupElement.length; i++) {
|
||||||
|
popupElement[i].setAttribute("data-element", i);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".pop-up-button").click(function() {
|
||||||
|
|
||||||
|
let buttonID = this.getAttribute("data-button");
|
||||||
|
|
||||||
|
$(".pop-up-element").each(function() {
|
||||||
|
|
||||||
|
let elementID = this.getAttribute("data-element");
|
||||||
|
$(".pop-up-button").removeClass('current');
|
||||||
|
|
||||||
|
if (buttonID == elementID) {
|
||||||
|
$(this).animate({ 'opacity': 'show' }, 500);
|
||||||
|
} else {
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
$(this).addClass('current');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(".pop-up-element:first-child").show();
|
||||||
|
$(".pop-up-button:first-child").addClass("current");
|
||||||
|
$(".pop-up-element:first-child").addClass("current");
|
||||||
|
</script>
|
||||||
3098
module/collection/edit_collection.inc.php
Normal file
3098
module/collection/edit_collection.inc.php
Normal file
File diff suppressed because it is too large
Load Diff
366
module/collection/edit_collection_cardform.inc.php
Normal file
366
module/collection/edit_collection_cardform.inc.php
Normal file
@@ -0,0 +1,366 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
// Masked
|
||||||
|
global $masked;
|
||||||
|
|
||||||
|
if($masked){?>
|
||||||
|
<style>
|
||||||
|
.collection_field table.cardform td:first-child {
|
||||||
|
width: 100%;
|
||||||
|
height: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<?php }
|
||||||
|
// Masked
|
||||||
|
$collection_setup_id;
|
||||||
|
$collection_setup_id = NULL;
|
||||||
|
if (isset($_GET["level_2"]) && (int)$_GET["level_2"]) {
|
||||||
|
$collection_setup_id = $_GET["level_2"];
|
||||||
|
}
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE id = '" . $collection_setup_id."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$collection_setup = @mysqli_fetch_array($result);
|
||||||
|
|
||||||
|
if($collection_setup['is_custom_collection'] == '1'){
|
||||||
|
|
||||||
|
$masked = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// erstelle kollektionen sammeln
|
||||||
|
$collection_setups = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
// erstellte kontaktformulare sammeln
|
||||||
|
$contactforms = array();
|
||||||
|
$query = "SELECT * FROM contactform_header WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) AND collection_header = 0";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$contactforms[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sorting_values = array(
|
||||||
|
$translation->get("collection_sorting_keep"),
|
||||||
|
$translation->get("collection_sorting_change_top"),
|
||||||
|
$translation->get("collection_sorting_change_bottom")
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script> $( "#overlaycrumb , .collectionform, .collections form#form_line_list " ).wrapAll( "<div class='collection-main-wrapper' />");
|
||||||
|
$( "ul.toolbar_menu.collection, .collection_form.collection " ).wrapAll( "<div class='collection-wrapper'></div>" );
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function showCollectionSavingLoader() {
|
||||||
|
jQuery('#overlay').show();
|
||||||
|
jQuery('#overlayWrapper').show();
|
||||||
|
jQuery('#overlayLoader').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveCollectionMasked(_close){
|
||||||
|
showCollectionSavingLoader();
|
||||||
|
|
||||||
|
var aFormData = new FormData();
|
||||||
|
|
||||||
|
// wird benoetigt damit die Inhalte des fckeditors uebertragen werden koennen
|
||||||
|
for (instance in CKEDITOR.instances) {
|
||||||
|
CKEDITOR.instances[instance].updateElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#overlayContent :input').each(function() {
|
||||||
|
if ($(this).attr("type") == "file") {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).get(0).files[0]);
|
||||||
|
} else if ($(this).attr("type") == "checkbox") {
|
||||||
|
if ($(this).prop("checked") === true) {
|
||||||
|
aFormData.append($(this).attr("name"), "on");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
loadCard('savemasked_collection', true, '', _close, aFormData);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveCollection(_close) {
|
||||||
|
|
||||||
|
showCollectionSavingLoader();
|
||||||
|
|
||||||
|
var aFormData = new FormData();
|
||||||
|
|
||||||
|
// wird benoetigt damit die Inhalte des fckeditors uebertragen werden koennen
|
||||||
|
for (instance in CKEDITOR.instances) {
|
||||||
|
CKEDITOR.instances[instance].updateElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#overlayContent :input').each(function() {
|
||||||
|
if ($(this).attr("type") == "file") {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).get(0).files[0]);
|
||||||
|
} else if ($(this).attr("type") == "checkbox") {
|
||||||
|
if ($(this).prop("checked") === true) {
|
||||||
|
aFormData.append($(this).attr("name"), "on");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
loadCard('save_collection', true, '', _close, aFormData);
|
||||||
|
}
|
||||||
|
function copy_collection(_close) {
|
||||||
|
|
||||||
|
var aFormData = new FormData();
|
||||||
|
|
||||||
|
// wird benoetigt damit die Inhalte des fckeditors uebertragen werden koennen
|
||||||
|
for (instance in CKEDITOR.instances) {
|
||||||
|
CKEDITOR.instances[instance].updateElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#overlayContent :input').each(function() {
|
||||||
|
if ($(this).attr("type") == "file") {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).get(0).files[0]);
|
||||||
|
} else if ($(this).attr("type") == "checkbox") {
|
||||||
|
if ($(this).prop("checked") === true) {
|
||||||
|
aFormData.append($(this).attr("name"), "on");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
loadCard('copy_collection', true, '', _close, aFormData);
|
||||||
|
}
|
||||||
|
function toggle_registration_forms(_checkbox) {
|
||||||
|
if ($(_checkbox).is(":checked")) {
|
||||||
|
$('.registration_select', $('#<?php echo $formname; ?>')).show();
|
||||||
|
} else {
|
||||||
|
$('.registration_select', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="overlaycrumb" class='collection'>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
input($translation->get("collection_title"), "input_description", "text", $input_collection["description"], 255);
|
||||||
|
create_contactform_select($contactforms, $translation->get("registration_form"), "registration_contactform_id", $input_collection, (int)$input_collection["registration"] == 0 ? TRUE : FALSE);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (count($collection_setups) == 0) {
|
||||||
|
|
||||||
|
// Wenn keine Kollektionseinstellungen angelegt wurden, dann nicht weiter machen
|
||||||
|
|
||||||
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div>";
|
||||||
|
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu collection">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
if (is_page_edit()) {
|
||||||
|
button("left", $translation->get("show_all"), $formname, "loadCard('list_collection_page', true)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$masked){
|
||||||
|
// Speichern button
|
||||||
|
button("save", $translation->get("save"), $formname, "saveCollection(false)");
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "saveCollection(true)");
|
||||||
|
// Kopie Kollecktion
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "saveCollectionMasked(true)");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
button("back", $translation->get("back"), $formname, "backButton()", "", FALSE);
|
||||||
|
|
||||||
|
|
||||||
|
if ($input_collection["id"] != "") {
|
||||||
|
button("copy", $translation->get("copy_collection_setup_entry"), $formname, "copy_collection(true)", "", FALSE);
|
||||||
|
}
|
||||||
|
// Loeschen button
|
||||||
|
if ($input_collection["id"] != "" && is_page_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_collection', true, '{$translation->get('delete_collection_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
if ($input_collection["id"] != "") {
|
||||||
|
input("Archiv", "input_is_archived", "checkbox", (int)$input_collection["is_archived"] === 1 ? "on" : "");
|
||||||
|
}
|
||||||
|
// Zuruecksetzen
|
||||||
|
?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post" class='collection_form collection'>
|
||||||
|
<input name="input_collection_id" type="hidden" value="<?= $input_collection["id"] ?>">
|
||||||
|
<input type="hidden" name="main_collection_setup_id" value="<?php echo $input_collection['main_collection_setup_id']; ?>" />
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||||
|
<?php if($masked){
|
||||||
|
$count = 5;
|
||||||
|
for($i = 1; $i<= $count; $i++){
|
||||||
|
?>
|
||||||
|
<table class="cardform quickentry card_count<?=$i?>" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
text($translation->get("collection_type"), $collection_setup['description']);
|
||||||
|
echo '<div class="dp">';
|
||||||
|
input($translation->get("validity_from"), "input_validity_from", "date", datefromsql($input_collection["validity_from"]), 10);
|
||||||
|
input($translation->get("validity_from"), "input_validity_from", "date", datefromsql($input_collection["validity_from"]), 10);
|
||||||
|
echo '</div>';
|
||||||
|
// input_select($translation->get("collection_change_sorting"), "input_change_sorting", $values = array_keys($sorting_values), $value_names = array_values($sorting_values), "", FALSE, FALSE);
|
||||||
|
// input($translation->get("registration_possible"), "input_registration", "checkbox", $input_collection["registration"], NULL, FALSE, FALSE, 'onchange="toggle_registration_forms(this);"');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<div class="full-block">
|
||||||
|
<hr>
|
||||||
|
<div class="collectionform">
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$collectionFieldSetups = array();
|
||||||
|
|
||||||
|
$query = "SELECT * FROM main_collection_setup_content WHERE main_collection_setup_id = '" . $collection_setup_id . "' ORDER BY sorting ASC";
|
||||||
|
|
||||||
|
$result_collection = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result_collection, 1)) {
|
||||||
|
$collectionFieldSetups[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($collectionFieldSetups)) {
|
||||||
|
|
||||||
|
foreach ($collectionFieldSetups as $row) {
|
||||||
|
echo "<tr><td>";
|
||||||
|
|
||||||
|
create_collection_input_field_masked($row, $collection_setup_id, $i);
|
||||||
|
|
||||||
|
echo "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<?php } //end foreach ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<div class="collection_toolbar_table">
|
||||||
|
<table class="cardform " border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
// if ($collection_setup['collection_type'] == 1) {
|
||||||
|
try {
|
||||||
|
//code...
|
||||||
|
|
||||||
|
multi_select_permission($input_collection['id'], 'department');
|
||||||
|
multi_select_permission($input_collection['id'], 'role');
|
||||||
|
multi_select_permission($input_collection['id'], 'einricht');
|
||||||
|
multi_select_permission($input_collection['id'], 'fachbereich');
|
||||||
|
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
echo $th;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
create_mandant_select($input_collection['id']);
|
||||||
|
|
||||||
|
if ($collection_setup['collection_type'] == 4) {
|
||||||
|
create_knowledegecenter_category_select($input_collection['id']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($input_collection["id"] != "") {
|
||||||
|
create_collection_groups_select($input_collection);
|
||||||
|
}
|
||||||
|
// create_collection_tags();
|
||||||
|
input($translation->get("validity_from"), "input_validity_from", "date", ($input_collection["validity_from"]), 10);
|
||||||
|
input($translation->get("validity_to"), "input_validity_to", "date", ($input_collection["validity_to"]), 10);
|
||||||
|
// input($translation->get("active"), "input_active", "checkbox", $input_collection["active"], 10);
|
||||||
|
input($translation->get("readable"), "input_readable", "checkbox", "", 10);
|
||||||
|
// input_select($translation->get("collection_change_sorting"), "input_change_sorting", $values = array_keys($sorting_values), $value_names = array_values($sorting_values), "", FALSE, FALSE);
|
||||||
|
// input($translation->get("registration_possible"), "input_registration", "checkbox", $input_collection["registration"], NULL, FALSE, FALSE, 'onchange="toggle_registration_forms(this);"');
|
||||||
|
create_contactform_select($contactforms, $translation->get("registration_form"), "registration_contactform_id", $input_collection, (int)$input_collection["registration"] == 0 ? TRUE : FALSE);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
<!-- <?php
|
||||||
|
if ($collection_setup['collection_type'] == 3) {
|
||||||
|
require_once MODULE_PATH. "calendar/calendar_collection_serial.php";
|
||||||
|
}
|
||||||
|
?> -->
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<?
|
||||||
|
if ($input_collection['id'] != "") {
|
||||||
|
require_once("edit_collection_line_listform.inc.php");
|
||||||
|
}
|
||||||
|
if($collection_setup['is_custom_collection'] && $input_collection['id'] != ''){
|
||||||
|
$collection_id = $input_collection['id'];
|
||||||
|
require_once("edit_collection_custom_list.inc.php");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// function btnClicked(el){
|
||||||
|
// if ($(el).parent(".collection_field").hasClass("current")){
|
||||||
|
// $(el).parent(".collection_field").children(".input.active").removeClass("active");
|
||||||
|
// $(el).parent(".collection_field").removeClass("current");
|
||||||
|
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// $(el).parent(".collection_field").children(".input").addClass("active");
|
||||||
|
// $(el).parent(".collection_field").addClass("current");
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
</script>
|
||||||
127
module/collection/edit_collection_custom_list.inc.php
Normal file
127
module/collection/edit_collection_custom_list.inc.php
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
use DynCom\mysyde\common\classes\CollectionTypes;
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_line_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::getCustom();
|
||||||
|
|
||||||
|
|
||||||
|
$collectionTypes = \DynCom\mysyde\common\classes\CollectionTypes::get();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function toggleScrollerHeadline() {
|
||||||
|
var contentscroller = $('.inhalte_toggle_container');
|
||||||
|
contentscroller.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function contentmenuClick( _el, _fieldtype, _type_id, selectedField = '' ) {
|
||||||
|
saveCollection(false);
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
setCurrentToolbarClicked(_el);
|
||||||
|
jQuery('input[name="fieldtype"]', jQuery('#<?php echo $formname; ?>')).val(_fieldtype);
|
||||||
|
jQuery('input[name="type_id"]', jQuery('#<?php echo $formname; ?>')).val(_type_id);
|
||||||
|
jQuery('input[name="selectedField"]', jQuery('#<?php echo $formname; ?>')).val(selectedField);
|
||||||
|
// saveCollection(false);
|
||||||
|
loadCard('newCustomLine_collection', true);
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post" style="position:unset;">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $collection_setup_id ?>">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_line_id" value="" />
|
||||||
|
|
||||||
|
<input type="hidden" name="fieldtype" value="" />
|
||||||
|
<input type="hidden" name="selectedField" value="">
|
||||||
|
<input type="hidden" name="type_id" value="" />
|
||||||
|
<input type="hidden" name="collection_id" value="<?=$collection_id?>" />
|
||||||
|
|
||||||
|
<h3 ><?php echo $translation->get("collection_field_headline"); ?></h3>
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "toggleScrollerHeadline();", "", FALSE); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('editLineSetup_collection')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('deleteLineSetup_collection', false, '{$translation->get('delete_setup_line_collection_confirm')}')", "", FALSE); ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="inhalte_toggle_container" id="inhalte_form_headline">
|
||||||
|
<div id="srollerInhalteHeadline"><h2><?php echo $translation->get("insert_new_field"); ?></h2></div>
|
||||||
|
</div>
|
||||||
|
<div id="pagecontentScroller" class="pagecontentScroller inhalte_toggle_container">
|
||||||
|
<div class="scroller_inhalte">
|
||||||
|
|
||||||
|
<ul class="inhalte_menu">
|
||||||
|
<?php
|
||||||
|
button('inhalt_eingabefeld graybox', "Eingabefeld", $formname, "contentmenuClick(this, 'standard', 0, 1)");
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($siteparts as $sitepartId => $sitepartData) {
|
||||||
|
if ((isset($sitepartData['is_shop']) || $sitepartData['is_shop'] === TRUE) && $sitepartId != 14) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
button($sitepartData['class'], $sitepartData['description'], $formname, "contentmenuClick(this, 'siteparts', " . $sitepartId . ")");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$query = "SELECT * FROM main_collection_setup_content WHERE main_collection_setup_id = '" . $collection_setup_id . "' AND main_collection_id = '".$collection_id."' ORDER BY sorting ASC";
|
||||||
|
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
if ($num_rows >= 1) {
|
||||||
|
echo " <table data-sortableupdateaction=\"update_sortorder_setup_collection\" cellpadding=0 cellspacing=0 border=0 class=\"linklist sortableTable\">\n";
|
||||||
|
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_key($translation->get("type"), "");
|
||||||
|
echo format_key("", "");
|
||||||
|
echo format_key($translation->get("description"), "");
|
||||||
|
echo format_key($translation->get("show_in_teaser"), "");
|
||||||
|
echo "</tr>";
|
||||||
|
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo "</tr>";
|
||||||
|
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
|
||||||
|
if ($row['fieldtype'] == 'siteparts') {
|
||||||
|
// die zeile bezieht sich auf ein sitepart
|
||||||
|
$sitepartType = $translation->get("sitepart") . ": " . $siteparts[$row['type_id']]['description'];
|
||||||
|
} else {
|
||||||
|
// zeile ist ein extra datentyp fuer kollektionen
|
||||||
|
$sitepartType = $translation->get("input_field") . ": " . $collectionTypes[$row['type_id']]['description'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$checkedRow = $row['id'] == $_REQUEST["input_line_id"] ? 'true' : 'false';
|
||||||
|
|
||||||
|
echo " <tr id=\"linklistid_{$row['id']}\" class=\"linklist_content\" data-checked=\"{$checkedRow}\" data-inputname=\"input_id\" data-action=\"editLineSetup_collection\" data-inputid=\"{$row['id']}\">\n";
|
||||||
|
|
||||||
|
echo format_value($sitepartType, "input_id");
|
||||||
|
echo format_value("", "sorticon", "sort");
|
||||||
|
echo format_value($row['fieldname'], "input_id");
|
||||||
|
echo format_value($row['is_teaser'], "input_id", "boolean");
|
||||||
|
|
||||||
|
echo " </tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo " </table>\n";
|
||||||
|
} else {
|
||||||
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,351 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_choose_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::getCustom();
|
||||||
|
function create_type_select( $name, $selectname = "input_choose_type", $input_line, $selectedField = '' ) {
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$collectionTypes = \DynCom\mysyde\common\classes\CollectionTypes::get();
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::getCustom();
|
||||||
|
echo "<div class=\"label\"><label for=\"" . $selectname . "\">" . $name . "</label></div>";
|
||||||
|
echo "<div class=\"input\"><select onchange=\"load_sitepart_settings(this.value);\" class=\"bigselect\" name=\"" . $selectname . "\" id=\"" . $selectname . "\">";
|
||||||
|
|
||||||
|
|
||||||
|
// neue typen die nur fuer kollektionen vorgesehen sind
|
||||||
|
foreach ($collectionTypes as $typeId => $typeData) {
|
||||||
|
$selected = '';
|
||||||
|
if (isset($input_line['fieldtype']) && $input_line['fieldtype'] == 'standard' && $typeId == $input_line['type_id']) {
|
||||||
|
$selected = 'selected="selected"';
|
||||||
|
}else if($selectedField != "" && $typeId == $selectedField){
|
||||||
|
$selected = 'selected="selected"';
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// echo 'selected ist'.$typeId.' and val ist'.$selectedField;
|
||||||
|
|
||||||
|
echo "<option " . $selected . " value=\"" . $typeId . "\">" . $typeData['description'] . "</option>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// // siteparts anzeigen
|
||||||
|
// echo "<optgroup label=\"Siteparts\" value=\"siteparts\">";
|
||||||
|
// foreach($siteparts as $sitepartId => $sitepartData) {
|
||||||
|
// $selected = '';
|
||||||
|
//
|
||||||
|
// if(isset($input_line['fieldtype']) && $input_line['fieldtype'] == 'siteparts' && $sitepartId == $input_line['type_id']) {
|
||||||
|
// $selected = 'selected="selected"';
|
||||||
|
// }
|
||||||
|
// echo "<option " . $selected . " value=\"" . $sitepartId . "\">" . $sitepartData['description'] . "</option>";
|
||||||
|
// }
|
||||||
|
// echo "</optgroup>";
|
||||||
|
|
||||||
|
echo "</select>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sitepart_options = array();
|
||||||
|
if (isset($input_line['options'])) {
|
||||||
|
$sitepart_options = unserialize($input_line['options']);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
loadFields();
|
||||||
|
})
|
||||||
|
|
||||||
|
function setCollectionType( _select ) {
|
||||||
|
var collectiontype = jQuery(_select).find('option:selected').parent().attr('value');
|
||||||
|
jQuery('#collection_type', jQuery('#<?php echo $formname; ?>')).val(collectiontype);
|
||||||
|
if (collectiontype == 'siteparts') {
|
||||||
|
load_sitepart_settings(jQuery(_select).val());
|
||||||
|
} else {
|
||||||
|
jQuery('#collection_type_settings').html('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadFields() {
|
||||||
|
|
||||||
|
let _sitepartId = $('#main_input_choose_type').val();
|
||||||
|
|
||||||
|
//Zeichenlängefeld
|
||||||
|
if( _sitepartId == 1 || _sitepartId == 2 ) {
|
||||||
|
$('#main_input_maxlength').closest('tr').show();
|
||||||
|
} else {
|
||||||
|
$('#main_input_maxlength').val('').closest('tr').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Zeichenlängefeld
|
||||||
|
if( _sitepartId == 6 || _sitepartId == 7 ) {
|
||||||
|
$('#main_input_option_string').closest('tr').show();
|
||||||
|
} else {
|
||||||
|
$('#main_input_option_string').val('').closest('tr').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Zeichenlängefeld
|
||||||
|
if( _sitepartId == 2) {
|
||||||
|
$('#main_input_is_bulletlist').closest('tr').show();
|
||||||
|
} else {
|
||||||
|
$('#main_input_is_bulletlist').val('').closest('tr').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_sitepart_settings( _sitepartId ) {
|
||||||
|
|
||||||
|
loadFields();
|
||||||
|
|
||||||
|
jQuery('#collection_type_settings').html('');
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("sitepartid", _sitepartId);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=loadsitepart_collection",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
jQuery('#collection_type_settings').html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_line["id"] == "") {
|
||||||
|
echo $translation->get("new_collection_field");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_collection_field");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php button("closeoverlay", $translation->get("back"), $formname, "loadCard('editCustomSetup_collection', true)"); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('editCustomSetup_collection', true)");
|
||||||
|
|
||||||
|
// Speichern buttons
|
||||||
|
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('saveLine_collection', true)");
|
||||||
|
|
||||||
|
if ($input_line["id"] != "") {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('deleteLineSetup_collection', true, '{$translation->get('delete_line_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_teaser = 1;
|
||||||
|
if (isset($input_line["is_teaser"])) {
|
||||||
|
$is_teaser = $input_line["is_teaser"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$show_description_title = 0;
|
||||||
|
if (isset($input_line["show_description_title"])) {
|
||||||
|
$show_description_title = $input_line["show_description_title"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_bulletlist = 0;
|
||||||
|
if (isset($input_line["is_bulletlist"])) {
|
||||||
|
$is_bulletlist = $input_line["is_bulletlist"];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_line_id" type="hidden" value="<?= $input_line["id"] ?>" />
|
||||||
|
<input name="input_id" type="hidden" value="<?= $_REQUEST['input_id'] ?>">
|
||||||
|
<input name="collection_id" type="hidden" value="<?= $_REQUEST['collection_id']; ?>">
|
||||||
|
<input type="hidden" name="collection_type" id="collection_type" value="<?= $input_line["fieldtype"]; ?>" />
|
||||||
|
<input type="hidden" name="selectedField" id="selectedField" value="<?= $_REQUEST['selectedField']; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<?php if ($input_line['fieldtype'] == 'standard'): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?
|
||||||
|
$selectedField = $_REQUEST['selectedField'];
|
||||||
|
create_type_select($translation->get("choose_type"), "main_input_choose_type", $input_line, $selectedField); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php else: ?>
|
||||||
|
<input type="hidden" name="main_input_choose_type" value="<?php echo $input_line['type_id']; ?>" />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($input_line['fieldtype'] == 'standard') { ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("input_maxlength"), "main_input_maxlength", "number", $input_line["input_maxlength"]) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("note"), "main_input_note", "text", $input_line["note"]) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr style="display:none">
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("textkey"), "main_input_code", "code", $input_line["code"], 20) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "main_input_description", "text", $input_line["fieldname"], 45) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php if ($input_line['fieldtype'] == 'standard') { ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("optionvalues"), "main_input_option_string", "text", $input_line["option_string"], 400) ?>
|
||||||
|
<div class="main_input_option_string" style="display:none;">
|
||||||
|
<div id="example1">
|
||||||
|
<div class="r-group">
|
||||||
|
<p>
|
||||||
|
<label for="main_input_option_string_0_0" data-pattern-text="<?= $translation->get("optionvalues");?> +=1:"><?= $translation->get("optionvalues");?> 1:</label>
|
||||||
|
<input type="text" name="main_input_option_string[0]" id="main_input_option_string_0" class="form-control" data-pattern-name="vehicle[++]" data-pattern-id="main_input_option_string_++" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<!-- Add a remove button for the item. If one didn't exist, it would be added to overall group -->
|
||||||
|
<button type="button" class="r-btnRemove btn btn-danger">Remove -</button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="r-btnAdd btn btn-primary">Add +</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("is_bulletlist"), "main_input_is_bulletlist", "checkbox", $is_bulletlist) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("show_in_teaser"), "main_input_is_teaser", "checkbox", $is_teaser) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("show_description_title"), "main_input_show_description_title", "checkbox", $show_description_title) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("mandatory_field"), "main_input_mandatory", "checkbox", $input_line["mandatory"]) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="collection_type_settings">
|
||||||
|
<?php
|
||||||
|
if ($input_line['fieldtype'] == 'siteparts' && $input_line['type_id'] > 0) {
|
||||||
|
$sitepartCode = $siteparts[$input_line['type_id']]['code'];
|
||||||
|
$sitepartfolder = $siteparts[$input_line['type_id']]['folder'];
|
||||||
|
|
||||||
|
$include = MODULE_PATH . $sitepartfolder . "/collection_" . $sitepartCode . "_cardform.inc.php";
|
||||||
|
if (file_exists($include)) {
|
||||||
|
require_once($include);
|
||||||
|
}
|
||||||
|
} elseif ($input_line['fieldtype'] == 'standard' && $input_line['type_id'] == 5) {
|
||||||
|
$include = MODULE_PATH . "collection/edit_collection_image_config.inc.php";
|
||||||
|
if (file_exists($include)) {
|
||||||
|
require_once($include);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
// var $y = jQuery.noConflict();
|
||||||
|
// $y('#example1').repeater({
|
||||||
|
// btnAddClass: 'r-btnAdd',
|
||||||
|
// btnRemoveClass: 'r-btnRemove',
|
||||||
|
// groupClass: 'r-group',
|
||||||
|
// minItems: 1,
|
||||||
|
// maxItems: 0,
|
||||||
|
// startingIndex: 0,
|
||||||
|
// showMinItemsOnLoad: true,
|
||||||
|
// reindexOnDelete: true,
|
||||||
|
// repeatMode: 'append',
|
||||||
|
// animation: 'fade',
|
||||||
|
// animationSpeed: 400,
|
||||||
|
// animationEasing: 'swing',
|
||||||
|
// clearValues: true
|
||||||
|
// }, [
|
||||||
|
// {
|
||||||
|
// "main_input_option_string[0]":"",
|
||||||
|
|
||||||
|
// }
|
||||||
|
// ]);
|
||||||
|
</script>
|
||||||
22
module/collection/edit_collection_image_config.inc.php
Normal file
22
module/collection/edit_collection_image_config.inc.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
if (!is_array($sitepart_options) || count($sitepart_options) == 0) {
|
||||||
|
$width = 1920;
|
||||||
|
$height = 1080;
|
||||||
|
} else {
|
||||||
|
$width = $sitepart_options["collection_setup_image_width"];
|
||||||
|
$height = $sitepart_options["collection_setup_image_height"];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<h2>Bildoptionen</h2>
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td><?php input($translation->get("max_width"), "collection_setup_image_width", "code", $width); ?> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php input($translation->get("max_height"), "collection_setup_image_height", "code", $height); ?> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
41
module/collection/edit_collection_line_listform.inc.php
Normal file
41
module/collection/edit_collection_line_listform.inc.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_line_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
|
||||||
|
$main_collection_setup_id = '';
|
||||||
|
if(!empty($input_collection)){
|
||||||
|
$main_collection_setup_id = $input_collection['main_collection_setup_id'];
|
||||||
|
}else if (isset($_GET["level_2"]) && (int)$_GET["level_2"]) {
|
||||||
|
$main_collection_setup_id = $_GET["level_2"];
|
||||||
|
}
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE id = '" . $main_collection_setup_id."'";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$main_collection_setup = @mysqli_fetch_array($result);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="collectionform">
|
||||||
|
<?php
|
||||||
|
$collectionFieldSetups = array();
|
||||||
|
if(!$main_collection_setup['is_custom_collection']){
|
||||||
|
$query = "SELECT * FROM main_collection_setup_content WHERE main_collection_setup_id = '" . $main_collection_setup_id . "' ORDER BY sorting ASC";
|
||||||
|
}else{
|
||||||
|
$query = "SELECT * FROM main_collection_setup_content WHERE main_collection_setup_id = '" . $main_collection_setup_id . "' AND main_collection_id = '".$input_collection['id']."' ORDER BY sorting ASC";
|
||||||
|
}
|
||||||
|
$result_collection = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result_collection, 1)) {
|
||||||
|
$collectionFieldSetups[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($collectionFieldSetups)) {
|
||||||
|
foreach ($collectionFieldSetups as $row) {
|
||||||
|
echo "<tr><td>";
|
||||||
|
|
||||||
|
create_collection_input_field($row, $input_collection);
|
||||||
|
|
||||||
|
echo "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
202
module/collection/edit_collection_listform.inc.php
Normal file
202
module/collection/edit_collection_listform.inc.php
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$filter = (isset($_REQUEST['filter']) ? $_REQUEST['filter'] : "");
|
||||||
|
global $filter_mandant;
|
||||||
|
$filter_mandant = (isset($_REQUEST['mandant_id']) ? $_REQUEST['mandant_id'] : 0);
|
||||||
|
|
||||||
|
$collection_setup_info = get_collection_setup_info();
|
||||||
|
|
||||||
|
function filter_mandant($filter){ ?>
|
||||||
|
<h3><?php echo get_translation('filter_mandant'); ?>:</h3>
|
||||||
|
<div class="input">
|
||||||
|
<select id="filter_mandant" name="filter_mandant" class="bigselect" onchange="filter_mandant();">
|
||||||
|
<option value="0"><?php echo get_translation('all_mandate'); ?></option>
|
||||||
|
<?php
|
||||||
|
$query = "SELECT * FROM main_mandant";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while($row = @mysqli_fetch_array($result)){ ?>
|
||||||
|
<option value="<?= $row['id'] ?>" <?= ($filter == $row['id'] ? 'selected="selected"' : ""); ?>><?= $row['description'] ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function filter_collection() {
|
||||||
|
jQuery('#form_collection_list .requestLoader').show();
|
||||||
|
|
||||||
|
var filter = jQuery('#collection_filter').val();
|
||||||
|
|
||||||
|
jQuery('#form_collection_list').attr("action", "?filter=" + filter).submit();
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
var formData = {
|
||||||
|
filter_id: jQuery('#collection_filter').val(),
|
||||||
|
};
|
||||||
|
|
||||||
|
jQuery('#filter_collection_setup_id').val(jQuery('#collection_filter').val());
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=filter_collection",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
success: function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
jQuery('#form_collection_list .requestLoader').hide();
|
||||||
|
jQuery('#page_linklist').html(output);
|
||||||
|
|
||||||
|
initForm();
|
||||||
|
initLinklist();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function filter_mandant() {
|
||||||
|
var filter = jQuery('#filter_mandant').val();
|
||||||
|
const url = window.location.href.split('&')[0];
|
||||||
|
if(window.location.search){
|
||||||
|
var newUrl = url + '&mandant_id='+filter;
|
||||||
|
}else{
|
||||||
|
var newUrl = url + '?mandant_id='+filter;
|
||||||
|
}
|
||||||
|
window.location.href = newUrl;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_collection', true)"); ?>
|
||||||
|
<!-- <?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_collection')"); ?> -->
|
||||||
|
<?php if(!$collection_setup_info['is_custom_collection']){
|
||||||
|
// echo button("new", $translation->get("mask"), $formname, "loadCard('mask_collection', true)");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<!-- <?= button("up", $translation->get("go_up"), $formname, "sendRequest('moveup_line_collection')", "", FALSE); ?>
|
||||||
|
<?= button("down", $translation->get("go_down"), $formname, "sendRequest('movedown_line_collection')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_collection', false, '{$translation->get('delete_collection_confirm')}')", "", FALSE); ?> -->
|
||||||
|
<!-- <?= button("xml", $translation->get("generate_xml"), $formname, "sendRequest('generate_xml')", "", FALSE); ?> -->
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<div class="filter-collection">
|
||||||
|
<h3><?php echo get_translation('filter'); ?>:</h3>
|
||||||
|
<div class="input">
|
||||||
|
<select id="collection_filter" name="collection_filter" class="bigselect" onchange="filter_collection();">
|
||||||
|
<option value="0"><?php echo get_translation('collection_filter_active'); ?></option>
|
||||||
|
<option value="past" <?php echo ($filter == "past" ? 'selected="selected"' : ""); ?>><?php echo get_translation('collection_filter_past'); ?></option>
|
||||||
|
<option value="future" <?php echo ($filter == "future" ? 'selected="selected"' : ""); ?>><?php echo get_translation('collection_filter_future'); ?></option>
|
||||||
|
<option value="all" <?php echo ($filter == "all" ? 'selected="selected"' : ""); ?>><?php echo get_translation('collection_filter_all'); ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="filter_mandant">
|
||||||
|
<?= filter_mandant($filter_mandant) ?>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<?php echo current_website_language($site, $language); ?>
|
||||||
|
<h1><?php echo $collection_setup_info['description']; ?></h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_collection_id" value="" />
|
||||||
|
<input type="hidden" id="filter_collection_setup_id" name="filter_collection_setup_id"
|
||||||
|
value="<?php echo(isset($_REQUEST['filter_id']) ? (int)$_REQUEST['filter_id'] : ''); ?>" />
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<div id="page_linklist">
|
||||||
|
<?
|
||||||
|
$where = "";
|
||||||
|
if ($collection_setup_id != 0) {
|
||||||
|
$where = " and main_collection.main_collection_setup_id = " . $collection_setup_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($filter) {
|
||||||
|
case 'past':
|
||||||
|
$where .= " AND (validity_to IS NOT NULL AND validity_to < '" . date("Y-m-d") . "') ";
|
||||||
|
break;
|
||||||
|
case 'future':
|
||||||
|
$where .= " AND (validity_from IS NOT NULL AND validity_from > '" . date("Y-m-d") . "') ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'all':
|
||||||
|
// muss nicht nach datum gefiltert werden
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$where .= " AND (validity_from IS NULL OR validity_from <= '" . date("Y-m-d") . "') ";
|
||||||
|
$where .= " AND (validity_to IS NULL OR validity_to >= '" . date("Y-m-d") . "') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($filter_mandant != NULL){
|
||||||
|
$where = " AND ((main_collection_mandant_link.main_collection_id IS NOT NULL AND main_mandant_id = ".$filter_mandant.") OR main_collection_mandant_link.main_collection_id IS NULL)";
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT
|
||||||
|
DISTINCT main_collection.id,
|
||||||
|
main_collection.description AS '" . $translation->get("description") . "',
|
||||||
|
from_unixtime(main_collection.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "',
|
||||||
|
main_admin_user.name AS '" . $translation->get("changed_by") . "'
|
||||||
|
from
|
||||||
|
main_collection left join main_admin_user
|
||||||
|
ON
|
||||||
|
main_collection.modified_user = main_admin_user.id
|
||||||
|
inner join main_collection_setup
|
||||||
|
ON
|
||||||
|
main_collection.main_collection_setup_id = main_collection_setup.id
|
||||||
|
LEFT JOIN main_collection_setup_websites
|
||||||
|
ON main_collection_setup.id = main_collection_setup_websites.main_collection_setup_id
|
||||||
|
LEFT JOIN main_collection_mandant_link
|
||||||
|
ON main_collection.id = main_collection_mandant_link.main_collection_id
|
||||||
|
where
|
||||||
|
(main_collection_setup.main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR main_collection_setup.all_languages = 1 OR main_collection_setup_websites.main_site_id = ".$GLOBALS['site']['id']." ) $where ORDER BY main_collection.main_collection_setup_id asc, sorting asc";
|
||||||
|
|
||||||
|
if($collection_setup_id == 4){
|
||||||
|
$query = query_infoboard($where);
|
||||||
|
}
|
||||||
|
$format = array('option', 'text', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_collection_id", "edit_collection", TRUE, "update_sortorder_collection", "sendRequest('delete_collection', false, '{$translation->get('delete_collection_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function query_infoboard($where){
|
||||||
|
$query = "SELECT DISTINCT main_collection.id,
|
||||||
|
IFNULL(DATE_FORMAT(main_data.data_date, '%d.%m.%Y'), '') AS 'Datum',
|
||||||
|
main_collection.description AS 'Beschreibung',
|
||||||
|
main_admin_user.name AS 'Geändert von'
|
||||||
|
FROM main_collection LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
ml.main_collection_id,
|
||||||
|
ml.data AS data_text,
|
||||||
|
STR_TO_DATE(ml.data, '%Y-%m-%d') AS data_date
|
||||||
|
FROM main_collection_link ml
|
||||||
|
WHERE ml.main_collection_setup_content_id = 54
|
||||||
|
) AS main_data ON main_collection.id = main_data.main_collection_id
|
||||||
|
LEFT JOIN main_admin_user
|
||||||
|
ON main_collection.modified_user = main_admin_user.id
|
||||||
|
LEFT JOIN main_collection_mandant_link
|
||||||
|
ON main_collection.id = main_collection_mandant_link.main_collection_id
|
||||||
|
WHERE main_collection.main_collection_setup_id = 4" . $where . " ORDER BY main_collection.main_collection_setup_id asc, main_data.data_date DESC";
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
?>
|
||||||
1225
module/collection/edit_collection_setup.inc.php
Normal file
1225
module/collection/edit_collection_setup.inc.php
Normal file
File diff suppressed because it is too large
Load Diff
150
module/collection/edit_collection_setup_cardform.inc.php
Normal file
150
module/collection/edit_collection_setup_cardform.inc.php
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
global $collection_setup_images;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var PATH_SETUP_ICON_COLLECTION = '<?php echo PATH_SETUP_ICON_COLLECTION; ?>';
|
||||||
|
|
||||||
|
function change_setup_icon( _image ) {
|
||||||
|
$('.setup_icon', $('#<?php echo $formname; ?>')).val(_image);
|
||||||
|
$('.setup_icon_container img').remove();
|
||||||
|
$('.setup_icon_container').append($('<img>').attr("src", PATH_SETUP_ICON_COLLECTION + _image));
|
||||||
|
}
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($('#is_multidomain').prop("checked") == true){
|
||||||
|
$('#websiteSelection').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#is_multidomain').click(function(){
|
||||||
|
if($(this).prop("checked") == true){
|
||||||
|
$('#websiteSelection').show();
|
||||||
|
}
|
||||||
|
else if($(this).prop("checked") == false){
|
||||||
|
$('#websiteSelection').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_collection["id"] == "") {
|
||||||
|
echo $translation->get("new_collection_setup");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_collection_setup");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
if (is_page_edit()) {
|
||||||
|
button("left", $translation->get("show_all"), $formname, "loadCard('list_collection_page', true)");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Speichern button
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_collection_setup', true)");
|
||||||
|
|
||||||
|
// Speichern und schliessen
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_collection_setup', true, '', true)");
|
||||||
|
|
||||||
|
if ($input_collection["id"] != "") {
|
||||||
|
button("copy", $translation->get("copy_collection_setup"), $formname, "loadCard('copy_collection_setup', true)");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// Loeschen button
|
||||||
|
if ($input_collection["id"] != "" && is_page_edit() === FALSE) {
|
||||||
|
echo button("delete", $translation->get("delete-collection"), $formname, "loadCard('delete_collection_setup', true, '{$translation->get('delete_collection_setup_confirm')}', true)", "", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zuruecksetzen
|
||||||
|
button("reset", $translation->get("restore"), $formname, "?action=edit", "", FALSE);
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_collection["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||||
|
<input name="data-sitepartid" type="hidden" value="8">
|
||||||
|
<input class="setup_icon" name="setup_icon" id="setup_icon" type="hidden"
|
||||||
|
value="<?php echo $input_collection['icon']; ?>" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? input($translation->get("textkey"), "input_code", "code", $input_collection["code"], 20) ?>
|
||||||
|
<? input($translation->get("collection_name"), "input_description", "text", $input_collection["description"], 255) ?>
|
||||||
|
<?php
|
||||||
|
$types = [
|
||||||
|
'1' => $translation->get("normal"),
|
||||||
|
'2' => $translation->get("job"),
|
||||||
|
'3' => $translation->get("calendar"),
|
||||||
|
'4' => $translation->get("top_knowledgecenter"),
|
||||||
|
];
|
||||||
|
$preselect = 1;
|
||||||
|
if(isset($input_collection['collection_type']) ){
|
||||||
|
$preselect = $input_collection['collection_type'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php input_select($translation->get("collection_type"), "collection_type", $values = array_keys($types), $value_names = array_values($types), $preselect, FALSE, FALSE); ?>
|
||||||
|
<?php collection_setup_world($input_collection); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
echo "<h3>".$translation->get("normal_collection_settings")."</h3>";
|
||||||
|
input($translation->get("collection_linked"), "input_linked", "checkbox", $input_collection["linked"]);
|
||||||
|
input($translation->get("desc_title"),"input_desc_title", "checkbox",$input_collection["desc_title"]);
|
||||||
|
input($translation->get("show_in_menu"),"input_show_in_menu", "checkbox",$input_collection["show_in_menu"]);
|
||||||
|
input($translation->get("Filter"),"input_show_filter", "checkbox",$input_collection["show_filter"]);
|
||||||
|
echo "<h3 class='irgendwas'>".$translation->get("advanced_collection_settings")."</h3>";
|
||||||
|
input($translation->get("custom"),"is_custom_collection", "checkbox",$input_collection["is_custom_collection"]);
|
||||||
|
input($translation->get("show_group_name"),"input_show_group_name", "checkbox",$input_collection["show_group_name"]);
|
||||||
|
input($translation->get("show_in_all_languages"), "input_all_languages", "checkbox", $input_collection["all_languages"]);
|
||||||
|
input($translation->get("frontend_creation"), "frontend_creation", "checkbox", $input_collection['is_multidomain'], NULL, FALSE, FALSE, '');
|
||||||
|
input($translation->get("is_multidomain").'?', "is_multidomain", "checkbox", $input_collection['is_multidomain'], NULL, FALSE, FALSE, '');
|
||||||
|
if ($input_collection["id"] != "") {
|
||||||
|
try {
|
||||||
|
collection_setup_websites($input_collection);
|
||||||
|
}catch(Exception $e) {
|
||||||
|
echo 'Message: ' .$e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?
|
||||||
|
if ($input_collection['id'] != "") {
|
||||||
|
if(!$input_collection['is_custom_collection']){
|
||||||
|
require_once("edit_collection_setup_line_listform.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once("edit_collection_setup_group_listform.inc.php");
|
||||||
|
}
|
||||||
|
?>
|
||||||
90
module/collection/edit_collection_setup_copy.inc.php
Normal file
90
module/collection/edit_collection_setup_copy.inc.php
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_setup_copy_card";
|
||||||
|
$main_layout_id = $GLOBALS["language"]["main_layout_id"];
|
||||||
|
$from = isset($_REQUEST['from']) ? $_REQUEST['from'] : '';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadLanguages( website_id ) {
|
||||||
|
$('#siteLanguages', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
if (website_id == "" || website_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).show();
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_languages",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
$('#siteLanguages', $('#<?php echo $formname; ?>')).html(output.site_languages);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataType : 'json'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php echo $translation->get("copy_collection"); ?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
|
||||||
|
<? button("left", $translation->get("back"), $formname, "loadCard('edit_collection_setup', true)"); ?>
|
||||||
|
<?= button("save", $translation->get("copy_and_save"), $formname, "loadCard('copy_and_save_collection_setup', true)"); ?>
|
||||||
|
<li>
|
||||||
|
<ul>
|
||||||
|
<?= button("reset", $translation->get("restore"), $formname, "?action=edit", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_collection["id"] ?>">
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $translation->get("copy_collection_to"); ?>:</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? site_select($translation->get("website"), "site_id", null, false, true, 'loadLanguages(this.value);'); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
<div id="siteLanguages"></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_group_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_line["id"] == "") {
|
||||||
|
echo $translation->get("new_collection_group");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_collection_group");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('edit_collection_setup', true)");
|
||||||
|
|
||||||
|
// Speichern buttons
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_group_collection_setup', true)");
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_group_collection_setup', true)");
|
||||||
|
|
||||||
|
if ($input_line["id"] != "") {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_group_collection_setup', true, '{$translation->get('delete_collection_group_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_group_id" type="hidden" value="<?= $input_line["id"] ?>" />
|
||||||
|
<input name="input_id" type="hidden" value="<?= $_REQUEST['input_id'] ?>">
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "input_description", "text", $input_line["description"], 255) ?>
|
||||||
|
<? input_select($translation->get("default_active"), "input_default_active", $values = array('0', '1'), $value_names = array($translation->get("no"), $translation->get("yes")), $input_line["default_active"]); ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
use DynCom\mysyde\common\classes\CollectionTypes;
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_group_line_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
$collectionTypes = \DynCom\mysyde\common\classes\CollectionTypes::get();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_id ?>">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_group_id" value="" />
|
||||||
|
|
||||||
|
<h3><?php echo $translation->get("collection_groups"); ?></h3>
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_group_collection_setup', true)", "", FALSE); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_group_collection_setup')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_group_collection_setup', false, '{$translation->get('delete_collection_group_confirm')}')", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?
|
||||||
|
$query = "SELECT id, description AS '" . $translation->get("description") . "' from main_collection_setup_group WHERE main_collection_setup_id = '" . $input_id . "' ORDER by id asc";
|
||||||
|
$format = array('option', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_group_id", "edit_group_collection_setup", "", "", "loadCard('delete_group_collection_setup', false, '{$translation->get('delete_collection_group_confirm')}')", TRUE);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</form>
|
||||||
506
module/collection/edit_collection_setup_line_cardform.inc.php
Normal file
506
module/collection/edit_collection_setup_line_cardform.inc.php
Normal file
@@ -0,0 +1,506 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_choose_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
|
||||||
|
$sitepart_options = array();
|
||||||
|
if (isset($input_line['options'])) {
|
||||||
|
$sitepart_options = unserialize($input_line['options']);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
loadFields();
|
||||||
|
})
|
||||||
|
|
||||||
|
function setCollectionType( _select ) {
|
||||||
|
var collectiontype = jQuery(_select).find('option:selected').parent().attr('value');
|
||||||
|
jQuery('#collection_type', jQuery('#<?php echo $formname; ?>')).val(collectiontype);
|
||||||
|
if (collectiontype == 'siteparts') {
|
||||||
|
load_sitepart_settings(jQuery(_select).val());
|
||||||
|
} else {
|
||||||
|
jQuery('#collection_type_settings').html('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadFields() {
|
||||||
|
|
||||||
|
let _sitepartId = $('#main_input_choose_type').val();
|
||||||
|
|
||||||
|
//Zeichenlängefeld
|
||||||
|
if( _sitepartId == 1 || _sitepartId == 2 ) {
|
||||||
|
$('#main_input_maxlength').closest('tr').show();
|
||||||
|
} else {
|
||||||
|
$('#main_input_maxlength').val('').closest('tr').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Zeichenlängefeld
|
||||||
|
if( _sitepartId == 6 || _sitepartId == 7 ) {
|
||||||
|
$('#main_input_option_string').closest('tr').show();
|
||||||
|
} else {
|
||||||
|
$('#main_input_option_string').val('').closest('tr').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Zeichenlängefeld
|
||||||
|
if( _sitepartId == 2) {
|
||||||
|
$('#main_input_is_bulletlist').closest('tr').show();
|
||||||
|
} else {
|
||||||
|
$('#main_input_is_bulletlist').val('').closest('tr').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_sitepart_settings( _sitepartId ) {
|
||||||
|
|
||||||
|
loadFields();
|
||||||
|
|
||||||
|
jQuery('#collection_type_settings').html('');
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("sitepartid", _sitepartId);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_sitepart_form",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
jQuery('#collection_type_settings').html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_line["id"] == "") {
|
||||||
|
echo $translation->get("new_collection_field");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_collection_field");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('edit_collection_setup', true)");
|
||||||
|
|
||||||
|
// Speichern buttons
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_line_collection_setup', true)");
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_line_collection_setup', true)");
|
||||||
|
|
||||||
|
if ($input_line["id"] != "") {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_collection_setup', true, '{$translation->get('delete_line_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$is_teaser = 1;
|
||||||
|
if (isset($input_line["is_teaser"])) {
|
||||||
|
$is_teaser = $input_line["is_teaser"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$show_description_title = 0;
|
||||||
|
if (isset($input_line["show_description_title"])) {
|
||||||
|
$show_description_title = $input_line["show_description_title"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_bulletlist = 0;
|
||||||
|
if (isset($input_line["is_bulletlist"])) {
|
||||||
|
$is_bulletlist = $input_line["is_bulletlist"];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_line_id" type="hidden" value="<?= $input_line["id"] ?>" />
|
||||||
|
<input name="input_id" type="hidden" value="<?= $_REQUEST['input_id'] ?>">
|
||||||
|
<input type="hidden" name="collection_type" id="collection_type" value="<?= $input_line["fieldtype"]; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<?php if ($input_line['fieldtype'] == 'standard'): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? create_type_select($translation->get("choose_type"), "main_input_choose_type", $input_line); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php else: ?>
|
||||||
|
<input type="hidden" name="main_input_choose_type" value="<?php echo $input_line['type_id']; ?>" />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($input_line['fieldtype'] == 'standard') { ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("input_maxlength"), "main_input_maxlength", "number", $input_line["input_maxlength"]) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php if ($input_line['fieldtype'] != 'group' && $input_line['fieldtype'] != 'collection_preview') { ?>
|
||||||
|
<? input($translation->get("note"), "main_input_note", "text", $input_line["note"]) ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<input type="hidden" name="main_input_note" value="" />
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("textkey"), "main_input_code", "code", $input_line["code"], 255) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "main_input_description", "text", $input_line["fieldname"], 45) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php if($input_line['fieldtype'] == 'siteparts' && $input_line['type_id'] == '10'){ ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("height_px"), "height", "text", $input_line["height"], 45) ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("width_px"), "width", "text", $input_line["width"], 45) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($input_line['type_id'] == 8889){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
$forms = array();
|
||||||
|
$form_ids = array();
|
||||||
|
$forms[] = '-----';
|
||||||
|
$form_ids[] = 0;
|
||||||
|
$query = "SELECT * FROM contactform_header WHERE is_survey = 0 AND is_multistep = 0 AND main_language_id = ".$GLOBALS["language"]['id'];
|
||||||
|
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
if ($num_rows >= 1) {
|
||||||
|
while($row = @mysqli_fetch_array($result)){
|
||||||
|
$forms[] = $row['description'];
|
||||||
|
$form_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<? input_select($translation->get("select_contactform"), "select_contactform", $form_ids, $forms, $input_line['option_string']); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php }?>
|
||||||
|
<?php if($input_line['type_id'] == 8888 && $input_line["id"] != ''){
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="preview_settings" value="1">
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
$collections[] = '-----';
|
||||||
|
$collection_ids[] = 0;
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE main_language_id = ".$GLOBALS["language"]['id'];
|
||||||
|
|
||||||
|
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
if ($num_rows >= 1) {
|
||||||
|
while($row = @mysqli_fetch_array($result)){
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$dataLinked = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup_preview WHERE main_collection_setup_id = ".$_REQUEST['input_id']." AND field_id = ".$input_line['id'];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$dataLinked = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<? input_select($translation->get("select_setup"), "select_setup", $collection_ids, $collections, $dataLinked['main_collection_setup_id_selected'], FALSE, FALSE, "onchange='loadPagesWithCollection(this.value);'"); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? input_select($translation->get("collection_preview_type"), "main_collection_view_type", $values = array('0', '1'), $value_names = array($translation->get("single_collection"), $translation->get("collection_list")), $dataLinked['main_collection_view_type'], FALSE, FALSE, 'onchange="toggle_view_type(this.value);"'); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
|
||||||
|
<div class="collection_pages">
|
||||||
|
<?
|
||||||
|
$dataLinked['main_collection_setup_id'] = $dataLinked['main_collection_setup_id_selected'];
|
||||||
|
create_page_with_collection_select($dataLinked['main_collection_setup_id'], $translation->get("page_with_collections"), "main_collection_page_list_id", $dataLinked, FALSE);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$display_list_choose;
|
||||||
|
if ($dataLinked["main_collection_view_type"] == 0) {
|
||||||
|
$display_list_choose = '';
|
||||||
|
$display_item_choose = 'style="display:none;"';
|
||||||
|
} else {
|
||||||
|
$display_item_choose = '';
|
||||||
|
$display_list_choose = 'style="display:none;"';
|
||||||
|
}
|
||||||
|
|
||||||
|
// einzelne kollektion
|
||||||
|
echo "<div class=\"collection_list_choose\" " .$display_list_choose." >";
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
$query = "SELECT DISTINCT mc.* FROM main_collection as mc WHERE mc.main_collection_setup_id = " . $_REQUEST['input_id'];
|
||||||
|
if (!empty($dataLinked) && $dataLinked['main_collection_setup_id'] != "") {
|
||||||
|
$query = "SELECT DISTINCT mc.* FROM main_collection as mc WHERE mc.main_collection_setup_id = " . $dataLinked['main_collection_setup_id'];
|
||||||
|
|
||||||
|
}
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
input_select($translation->get("choose_collection"), "main_collection_id", $values = !empty($dataLinked) ? $collection_ids : array(), $value_names = !empty($dataLinked) ? $collections : array(), $dataLinked['main_collection_id_selected'], FALSE, FALSE);
|
||||||
|
echo "</div>";
|
||||||
|
|
||||||
|
|
||||||
|
// kollektionsliste
|
||||||
|
echo "<div class=\"collection_items_choose\" " . $display_item_choose . ">";
|
||||||
|
$items = 990;
|
||||||
|
|
||||||
|
input($translation->get("collection_list_items"), "main_collection_items", "text", $items , 255);
|
||||||
|
|
||||||
|
|
||||||
|
// input($translation->get('job_specific'), 'job_selected'.$fieldSetup['id'], 'checkbox', $dataLinked["job_selected"] );
|
||||||
|
echo "</div>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php } else {?>
|
||||||
|
<input type="hidden" name="preview_settings" value="0">
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
<?php if ($input_line['fieldtype'] == 'standard') { ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("optionvalues"), "main_input_option_string", "text", $input_line["option_string"], 400) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("is_bulletlist"), "main_input_is_bulletlist", "checkbox", $is_bulletlist) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php if ($input_line['fieldtype'] != 'group' && $input_line['fieldtype'] != 'collection_preview' && $input_line['type_id'] != 16) { ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("show_in_teaser"), "main_input_is_teaser", "checkbox", $is_teaser) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("show_description_title"), "main_input_show_description_title", "checkbox", $show_description_title) ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="collection_type_settings">
|
||||||
|
<?php
|
||||||
|
if ($input_line['fieldtype'] == 'siteparts' && $input_line['type_id'] > 0) {
|
||||||
|
$sitepartCode = $siteparts[$input_line['type_id']]['code'];
|
||||||
|
$sitepartfolder = $siteparts[$input_line['type_id']]['folder'];
|
||||||
|
|
||||||
|
$include = MODULE_PATH . $sitepartfolder . "/collection_" . $sitepartCode . "_cardform.inc.php";
|
||||||
|
if (file_exists($include)) {
|
||||||
|
require_once($include);
|
||||||
|
}
|
||||||
|
} elseif ($input_line['fieldtype'] == 'standard' && $input_line['type_id'] == 5) {
|
||||||
|
$include = MODULE_PATH . "collection/edit_collection_image_config.inc.php";
|
||||||
|
if (file_exists($include)) {
|
||||||
|
require_once($include);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadPagesWithCollection( collection_setup_id ) {
|
||||||
|
load_collections(collection_setup_id);
|
||||||
|
console.log('hello');
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname ?>')).html("");
|
||||||
|
|
||||||
|
if (collection_setup_id == "" || collection_setup_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader', $('#<?php echo $formname ?>')).show();
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>' )[0]);
|
||||||
|
formData.append("collection_setup_id", collection_setup_id);
|
||||||
|
formData.append("page_link_id", '<?php echo $input_line["id"]; ?>');
|
||||||
|
formData.append("input_id", $('input[name=input_line_id]').val());
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=loadPage_collection",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
dataType : 'json',
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
console.log('log ist' + xhr.getResponseHeader('REQUIRES_AUTH'));
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.loader').hide();
|
||||||
|
$('.collection_pages' ).html(output.page_with_collection_select);
|
||||||
|
$('.collection_preview_group_select_container' ).html(output.collection_preview_group_select);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, exception) {
|
||||||
|
var msg = '';
|
||||||
|
if (jqXHR.status === 0) {
|
||||||
|
msg = 'Not connect.\n Verify Network.';
|
||||||
|
} else if (jqXHR.status == 404) {
|
||||||
|
msg = 'Requested page not found. [404]';
|
||||||
|
} else if (jqXHR.status == 500) {
|
||||||
|
msg = 'Internal Server Error [500].';
|
||||||
|
} else if (exception === 'parsererror') {
|
||||||
|
msg = 'Requested JSON parse failed.';
|
||||||
|
} else if (exception === 'timeout') {
|
||||||
|
msg = 'Time out error.';
|
||||||
|
} else if (exception === 'abort') {
|
||||||
|
msg = 'Ajax request aborted.';
|
||||||
|
} else {
|
||||||
|
msg = 'Uncaught Error.\n' + jqXHR.responseText;
|
||||||
|
}
|
||||||
|
console.log(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collections( collection_setup_id ) {
|
||||||
|
$('.collection_list_choose' ).html("");
|
||||||
|
console.log('form name ist' + '<?php echo $formname; ?>');
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("main_collection_setup_id_", collection_setup_id);
|
||||||
|
formData.append("input_id", $('input[name=input_line_id]').val());
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collection",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
console.log(output);
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose' ).html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggle_view_type( _type ) {
|
||||||
|
if (_type == 0) {
|
||||||
|
$('.collection_list_choose' ).show();
|
||||||
|
$('.collection_items_choose' ).hide();
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose' ).hide();
|
||||||
|
$('.collection_items_choose' ).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
136
module/collection/edit_collection_setup_line_listform.inc.php
Normal file
136
module/collection/edit_collection_setup_line_listform.inc.php
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
<?php
|
||||||
|
use DynCom\mysyde\common\classes\CollectionTypes;
|
||||||
|
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_line_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
|
||||||
|
$collectionTypes = \DynCom\mysyde\common\classes\CollectionTypes::get();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function toggleScrollerHeadline() {
|
||||||
|
var contentscroller = $('.inhalte_toggle_container');
|
||||||
|
contentscroller.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function contentmenuClick( _el, _fieldtype, _type_id ) {
|
||||||
|
|
||||||
|
setCurrentToolbarClicked(_el);
|
||||||
|
jQuery('input[name="fieldtype"]', jQuery('#<?php echo $formname; ?>')).val(_fieldtype);
|
||||||
|
console.log(jQuery('input[name="fieldtype"]').val());
|
||||||
|
jQuery('input[name="type_id"]', jQuery('#<?php echo $formname; ?>')).val(_type_id);
|
||||||
|
loadCard('new_line_collection_setup', true);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_id ?>">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_line_id" value="" />
|
||||||
|
|
||||||
|
<input type="hidden" name="fieldtype" value="" />
|
||||||
|
<input type="hidden" name="type_id" value="" />
|
||||||
|
|
||||||
|
<h3><?php echo $translation->get("collection_field_headline"); ?></h3>
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "toggleScrollerHeadline();", "", FALSE); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_line_collection_setup')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_collection_setup', false, '{$translation->get('delete_setup_line_collection_confirm')}')", "", FALSE); ?>
|
||||||
|
|
||||||
|
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_line_collection_setup')", "", FALSE); ?>
|
||||||
|
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_line_collection_setup')", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<div class="inhalte_toggle_container" id="inhalte_form_headline">
|
||||||
|
<div id="srollerInhalteHeadline"><h2><?php echo $translation->get("insert_new_field"); ?></h2></div>
|
||||||
|
</div>
|
||||||
|
<div id="pagecontentScroller" class="pagecontentScroller inhalte_toggle_container">
|
||||||
|
<div class="scroller_inhalte">
|
||||||
|
|
||||||
|
<ul class="inhalte_menu">
|
||||||
|
<?php
|
||||||
|
button('inhalt_eingabefeld graybox', "Eingabefeld", $formname, "contentmenuClick(this, 'standard', 1)");
|
||||||
|
button('inhalt_fließtext graybox', "Fließtext", $formname, "contentmenuClick(this, 'standard', 2)");
|
||||||
|
button('inhalt_datum graybox', "Datum", $formname, "contentmenuClick(this, 'standard', 3)");
|
||||||
|
// button('inhalt_datum graybox', "Zeit", $formname, "contentmenuClick(this, 'standard', 7777)");
|
||||||
|
button('inhalt_link graybox', "Link", $formname, "contentmenuClick(this, 'standard', 4)");
|
||||||
|
button('inhalt_bild graybox', "Bild", $formname, "contentmenuClick(this, 'standard', 5)");
|
||||||
|
|
||||||
|
foreach ($siteparts as $sitepartId => $sitepartData) {
|
||||||
|
if ((isset($sitepartData['is_shop']) || $sitepartData['is_shop'] === TRUE) && $sitepartId != 14) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if((isset($sitepartData['is_collection']) || $sitepartData['is_collection'] === TRUE)){
|
||||||
|
button($sitepartData['class'], $sitepartData['description'], $formname, "contentmenuClick(this, 'siteparts', " . $sitepartId . ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
button("inhalt_collection graybox", $translation->get("collection_preview"), $formname, "contentmenuClick(this, 'collection_preview', 8888)");
|
||||||
|
button("inhalt_contact graybox", $translation->get("connected_form"), $formname, "contentmenuClick(this, 'connected_form', 666)");
|
||||||
|
// button("inhalt_collection graybox", $translation->get("link_contactform"), $formname, "contentmenuClick(this, 'link_contactform', 8889)");
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$query = "SELECT * FROM main_collection_setup_content WHERE main_collection_setup_id = '" . $input_id . "' ORDER BY sorting ASC";
|
||||||
|
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
if ($num_rows >= 1) {
|
||||||
|
echo " <table data-sortableupdateaction=\"update_sortorder_collection_setup\" cellpadding=0 cellspacing=0 border=0 class=\"linklist sortableTable\">\n";
|
||||||
|
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_key($translation->get("type"), "");
|
||||||
|
echo format_key("", "");
|
||||||
|
echo format_key($translation->get("description"), "");
|
||||||
|
echo format_key($translation->get("show_in_teaser"), "");
|
||||||
|
echo "</tr>";
|
||||||
|
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo "</tr>";
|
||||||
|
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
|
||||||
|
if ($row['fieldtype'] == 'siteparts') {
|
||||||
|
// die zeile bezieht sich auf ein sitepart
|
||||||
|
$sitepartType = $translation->get("sitepart") . ": " . $siteparts[$row['type_id']]['description'];
|
||||||
|
} else {
|
||||||
|
// zeile ist ein extra datentyp fuer kollektionen
|
||||||
|
if($row['fieldtype'] != 'collection_preview' && $row['fieldtype'] != 'link_contactform'){
|
||||||
|
$sitepartType = $translation->get("input_field") . ": " . $collectionTypes[$row['type_id']]['description'];
|
||||||
|
}else if($row['fieldtype'] == 'collection_preview'){
|
||||||
|
$sitepartType = $translation->get("collection_preview");
|
||||||
|
}else{
|
||||||
|
$sitepartType = $translation->get("link_contactform");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$checkedRow = $row['id'] == $_REQUEST["input_line_id"] ? 'true' : 'false';
|
||||||
|
|
||||||
|
echo " <tr id=\"linklistid_{$row['id']}\" class=\"linklist_content\" data-checked=\"{$checkedRow}\" data-inputname=\"input_id\" data-action=\"edit_line_collection_setup\" data-inputid=\"{$row['id']}\">\n";
|
||||||
|
|
||||||
|
echo format_value($sitepartType, "input_id");
|
||||||
|
echo format_value("", "sorticon", "sort");
|
||||||
|
echo format_value($row['fieldname'], "input_id");
|
||||||
|
echo format_value($row['is_teaser'], "input_id", "boolean");
|
||||||
|
|
||||||
|
echo " </tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo " </table>\n";
|
||||||
|
} else {
|
||||||
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
28
module/collection/edit_collection_setup_listform.inc.php
Normal file
28
module/collection/edit_collection_setup_listform.inc.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_collection_setup', true)"); ?>
|
||||||
|
<?= button("left", $translation->get("collection_world"), $formname, "loadCard('load_collection_setup_world', true)"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<h1><?php echo get_translation('top_collections'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT main_collection_setup.id, description AS '" . $translation->get("description") . "', main_collection_setup.code AS '" . $translation->get("code") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from main_collection_setup left join main_admin_user ON main_collection_setup.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) ORDER BY id asc";
|
||||||
|
$format = array('option', 'text', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_id", "edit_collection_setup");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_choose_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_world["id"] == "") {
|
||||||
|
echo $translation->get("new_collection_world");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_collection_world");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('load_collection_setup_world', true)");
|
||||||
|
|
||||||
|
// Speichern buttons
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_collection_setup_world', true)");
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_collection_setup_world', true)");
|
||||||
|
|
||||||
|
if ($input_world["id"] != "") {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_collection_setup_world', true, '{$translation->get('delete_collection_setup_world_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_world_id" type="hidden" value="<?= $input_world["id"] ?>" />
|
||||||
|
<input name="input_id" type="hidden" value="<?= $_REQUEST['input_id'] ?>">
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "input_description", "text", $input_world["description"]) ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_world_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_world["id"] == "") {
|
||||||
|
echo $translation->get("collection_world");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("collection_world");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("save", $translation->get("save"), $formname, ""); ?>
|
||||||
|
<?= button("save", $translation->get("save_and_close"), $formname, "backButton()"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_id ?>">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_world_id" value="" />
|
||||||
|
<input type="hidden" name="fieldtype" value="" />
|
||||||
|
<input type="hidden" name="type_id" value="" />
|
||||||
|
<ul class="toolbar_menu collection_world">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_collection_setup_world', true)", "", FALSE); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_collection_setup_world')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_collection_setup_world', false, '{$translation->get('delete_collection_setup_world_confirm')}')", "", FALSE); ?>
|
||||||
|
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_collection_setup_world')", "", FALSE); ?>
|
||||||
|
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_collection_setup_world')", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
<?php
|
||||||
|
$query = "SELECT * FROM main_collection_setup_world ORDER BY sorting ASC";
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
if ($num_rows >= 1) {
|
||||||
|
echo " <table data-sortableupdateaction=\"update_sortorder_collection_setup_world\" cellpadding=0 cellspacing=0 border=0 class=\"linklist sortableTable\">\n";
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_key($translation->get("description"), "");
|
||||||
|
echo format_key("", "");
|
||||||
|
echo "</tr>";
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo "</tr>";
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
echo " <tr id=\"linklistid_{$row['id']}\" class=\"linklist_content\" data-checked=\"{$checkedRow}\" data-inputname=\"input_id\" data-action=\"edit_collection_setup_world\" data-inputid=\"{$row['id']}\">\n";
|
||||||
|
echo format_value($row['description'], "input_id");
|
||||||
|
echo format_value("", "sorticon", "sort");
|
||||||
|
echo " </tr>\n";
|
||||||
|
}
|
||||||
|
echo " </table>\n";
|
||||||
|
} else {
|
||||||
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_field_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_id ?>">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_line_id" value="" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||||
|
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||||
|
|
||||||
|
<h2><?php echo $translation->get("contact_field_headline"); ?></h2>
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("new", $translation->get("new_level"), $formname, "loadCard('new_line_contactform_level', true)", "", FALSE); ?>
|
||||||
|
<?= button("new", $translation->get("new_section"), $formname, "loadCard('new_line_contactform_section', true)", "", FALSE); ?>
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_line_contactform', true)", "", FALSE); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_line_contactform')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_contactform', false, '{$translation->get('delete_contactform_field_confirm')}')", "", FALSE); ?>
|
||||||
|
|
||||||
|
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_line_contactform')", "", FALSE); ?>
|
||||||
|
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_line_contactform')", "", FALSE); ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div class="tab">
|
||||||
|
<?
|
||||||
|
$query = "SELECT * FROM contactform_steps where contactform_id = ".$input_id;
|
||||||
|
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$i = 0;
|
||||||
|
while($row = mysqli_fetch_array($result)){
|
||||||
|
?>
|
||||||
|
<button class="tablinks" onclick="openTab(event, 'tab<?=$row['id']?>')" <?php if($i == 0){ ?> id="defaultOpen" <?php } ?> ><?= $row['name'];?></button>
|
||||||
|
|
||||||
|
<? $i ++; } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- tab div -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?
|
||||||
|
$query = "SELECT * FROM contactform_steps where contactform_id = ".$input_id;
|
||||||
|
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while($row = mysqli_fetch_array($result)){
|
||||||
|
?>
|
||||||
|
<div id="tab<?=$row['id']?>" class="tabcontent">
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<?
|
||||||
|
$query = "SELECT * FROM contactform_section where contactform_id = ".$input_id.'';
|
||||||
|
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$i = 0;
|
||||||
|
while($row = mysqli_fetch_array($result)){
|
||||||
|
?>
|
||||||
|
<button class="tablinks" onclick="openSection(event, 'tab_section_<?=$row['id']?>')" <?php if($i == 0){ ?> id="defaultOpen2" <?php } ?> ><?= $row['name'];?></button>
|
||||||
|
|
||||||
|
<? $i ++; } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- tab div -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</form>
|
||||||
36
module/collection/frontend_creation.inc.php
Normal file
36
module/collection/frontend_creation.inc.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<script type="text/javascript"
|
||||||
|
src="/mysyde/admin/admin.js?t=<?=
|
||||||
|
filemtime($_SERVER['DOCUMENT_ROOT'] . '/mysyde/admin/admin.js')
|
||||||
|
?>"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/ckfinder/ckfinder.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/dropzone/dropzone.js"></script>
|
||||||
|
<script type="text/javascript" src="/layout/admin/js/bc.backend.js"></script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($_GET['action'] == 'create_collection'){
|
||||||
|
require_once("collection_config.inc.php");
|
||||||
|
echo '<div id="overlayContent" class="contentSetup">';
|
||||||
|
if(isset($_GET['mian_collection_id']) && $_GET['mian_collection_id'] != ''){
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
function reloadPageWithoutParams() {
|
||||||
|
var url = window.location.href;
|
||||||
|
var newURL = url.split('?')[0]; // Teil vor dem Fragezeichen behalten
|
||||||
|
window.location.href = newURL; // Seite neu laden
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktionsaufruf
|
||||||
|
reloadPageWithoutParams();
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
// edit_collection($_GET['mian_collection_id'], $messages = array(), $frontend = TRUE);
|
||||||
|
}else{
|
||||||
|
require_once("frontend_creation_cardform.inc.php");
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
126
module/collection/frontend_creation_cardform.inc.php
Normal file
126
module/collection/frontend_creation_cardform.inc.php
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
|
||||||
|
<script type="text/javascript" src="/plugins/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="/plugins/ckfinder/ckfinder.js"></script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$formname = 'form_collection_cardform';
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get('translation');
|
||||||
|
$inputname = 'input_id';
|
||||||
|
$input_page_id = (isset($_REQUEST['input_page_id']) ? $_REQUEST['input_page_id'] : '');
|
||||||
|
|
||||||
|
$collection_setup_id = $_GET['setup_id'];
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="content-collection" class="collections">
|
||||||
|
<div id="overlay"></div>
|
||||||
|
<div id="overlayWrapper">
|
||||||
|
<div id="overlayContenting">
|
||||||
|
<div id="overlaycrumb" class='collection'>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
button("save", $translation->get("save"), $formname, "saveCollection(false)");
|
||||||
|
|
||||||
|
?>
|
||||||
|
<form id="<?=
|
||||||
|
$formname
|
||||||
|
?>" name="<?=
|
||||||
|
$formname
|
||||||
|
?>" method="post" class='collection_form collection'>
|
||||||
|
<input name="input_collection_id_frontend" id="input_collection_id_frontend" type="hidden" value="<?=
|
||||||
|
$input_collection['id']
|
||||||
|
?>">
|
||||||
|
<input type="hidden" name="main_collection_setup_id" value="<?php
|
||||||
|
echo $collection_setup_id;
|
||||||
|
?>" />
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php
|
||||||
|
echo $input_page_id;
|
||||||
|
?>" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
input($translation->get("collection_title"), "input_description", "text", $input_collection["description"], 255);
|
||||||
|
if ($input_collection['id'] != '') {
|
||||||
|
create_collection_groups_select($input_collection);
|
||||||
|
}
|
||||||
|
create_collection_tags();
|
||||||
|
input($translation->get('validity_from'), 'input_validity_from', 'date', datefromsql($input_collection['validity_from']), 10);
|
||||||
|
input($translation->get('validity_to'), 'input_validity_to', 'date', datefromsql($input_collection['validity_to']), 10);
|
||||||
|
create_contactform_select($contactforms, $translation->get('registration_form'), 'registration_contactform_id', $input_collection, (int) $input_collection['registration'] == 0 ? TRUE : FALSE);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
// create_mandant_select($input_collection['id']);
|
||||||
|
if ($collection_setup['collection_type'] == 4) {
|
||||||
|
// create_knowledegecenter_category_select($input_collection['id']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="collectionform">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$query = 'SELECT * FROM main_collection_setup_content WHERE main_collection_setup_id = ' . $collection_setup_id . ' ORDER BY sorting ASC';
|
||||||
|
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($content = @mysqli_fetch_array($result)) {
|
||||||
|
echo '<tr><td>';
|
||||||
|
$collectionData = array();
|
||||||
|
if(isset($input_collection['id']) && $input_collection['id'] != ''){
|
||||||
|
$collectionData = $input_collection;
|
||||||
|
}
|
||||||
|
create_collection_input_field($content, $collectionData);
|
||||||
|
echo '</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$( "#overlaycrumb , .collectionform, .collections form#form_line_list " ).wrapAll( "<div class='collection-main-wrapper' />");
|
||||||
|
$( "ul.toolbar_menu.collection, .collection_form.collection " ).wrapAll( "<div class='collection-wrapper'></div>" );
|
||||||
|
|
||||||
|
function showCollectionSavingLoader() {
|
||||||
|
jQuery('#overlay').show();
|
||||||
|
jQuery('#overlayWrapper').show();
|
||||||
|
jQuery('#overlayLoader').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveCollection(_close) {
|
||||||
|
|
||||||
|
showCollectionSavingLoader();
|
||||||
|
|
||||||
|
var aFormData = new FormData();
|
||||||
|
|
||||||
|
// wird benoetigt damit die Inhalte des fckeditors uebertragen werden koennen
|
||||||
|
for (instance in CKEDITOR.instances) {
|
||||||
|
CKEDITOR.instances[instance].updateElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#overlayContent :input').each(function() {
|
||||||
|
if ($(this).attr("type") == "file") {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).get(0).files[0]);
|
||||||
|
} else if ($(this).attr("type") == "checkbox") {
|
||||||
|
if ($(this).prop("checked") === true) {
|
||||||
|
aFormData.append($(this).attr("name"), "on");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
aFormData.append($(this).attr("name"), $(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(aFormData);
|
||||||
|
loadCard_frontend('frontend_collection', true, '', _close, aFormData);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
147
module/collection/masked_collection_functions.inc.php
Normal file
147
module/collection/masked_collection_functions.inc.php
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// masked collection
|
||||||
|
function create_collection_input_field_masked($fieldSetup, $collection_setup_id, $fieldCount)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//Übersetzung anzeigen
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
//Pflichtfeld einblenden wenn vorhanden
|
||||||
|
if (isset($fieldSetup['mandatory']) && $fieldSetup['mandatory'] != 0) {
|
||||||
|
$mandatory = "<span class=\"mandatory\"> *</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<div class=\"collection_field\">";
|
||||||
|
echo "<div class=\"label\"><label for=\"" . $fieldSetup['code'] . "\">" . $fieldSetup['fieldname'] . $mandatory . "</label></div>";
|
||||||
|
echo " <div class=\"input\">";
|
||||||
|
//Hinweis einblenden wenn vorhanden
|
||||||
|
if (isset($fieldSetup['note']) && $fieldSetup['note'] != '') {
|
||||||
|
echo "<div class=\"input_note\">" . $translation->get("note") . ": " . $fieldSetup['note'] . "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($fieldSetup['fieldtype'] == 'siteparts') {
|
||||||
|
|
||||||
|
$siteparts = \DynCom\mysyde\common\classes\Siteparts::get();
|
||||||
|
|
||||||
|
$sitepartConfig = $siteparts[$fieldSetup['type_id']];
|
||||||
|
|
||||||
|
$headerData = get_sitepart_header_data(0, $fieldSetup['id']);
|
||||||
|
|
||||||
|
// print_r(MODULE_PATH . $sitepartConfig['folder'] . "/collection_" . $sitepartConfig['code'] . "_line_listform.inc.php");
|
||||||
|
require(MODULE_PATH . $sitepartConfig['folder'] . "/collection_" . $sitepartConfig['code'] . "_line_listform.inc.php");
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// vorhandenen value auslesen
|
||||||
|
$data = '';
|
||||||
|
$linkText = '';
|
||||||
|
$query = "SELECT data, linkText FROM main_collection_link WHERE main_collection_setup_content_id = " . $fieldSetup['id'] . " AND main_collection_id = " . 0;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$row = @mysqli_fetch_array($result);
|
||||||
|
$data = $row['data'];
|
||||||
|
$linkText = $row['linkText'];
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<form id=\"form_collection_input_" . $fieldSetup['id'].'_count'.$fieldCount . "\" method=\"post\" name=\"form_collection_input_" . $fieldSetup['id'] .'_count'.$fieldCount. "\">";
|
||||||
|
echo "<input type=\"hidden\" name=\"input_collection_hidden_info_" . $fieldSetup['id'].'_count'.$fieldCount . "\" value=\"" . $fieldSetup['type_id'] . "\" />";
|
||||||
|
|
||||||
|
if ($fieldSetup['type_id'] != 2) {
|
||||||
|
$input_maxlength = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($fieldSetup['input_maxlength']) && $fieldSetup['input_maxlength'] != 0) {
|
||||||
|
$input_maxlength = $fieldSetup['input_maxlength'];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($fieldSetup['type_id']) {
|
||||||
|
|
||||||
|
case 2: // textarea
|
||||||
|
echo "<textarea id=\"input_collection_link_" . $fieldSetup['id']. '_count'.$fieldCount. "\" class=\"normal\" maxlength=\"" . $input_maxlength . "\" name=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount."\">" . $data . "</textarea>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: // datumsfeld
|
||||||
|
echo "<input id=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount. "\" class=\"code datepicker\" type=\"text\" value=\"" . $data . "\" maxlength=\"255\" name=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "\">";
|
||||||
|
echo "<script type=\"text/javascript\">$('#input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "').datepicker();</script>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4: // link
|
||||||
|
echo "<input id=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount."\" class=\"code\" type=\"text\" value=\"" . $data . "\" maxlength=\"255\" name=\"input_collection_link_" . $fieldSetup['id'] . "\">";
|
||||||
|
echo "<div><div class='input_note'>Link Text </div><input id=\"input_collection_link_text_" . $fieldSetup['id'] .'_count'.$fieldCount. "\" class=\"code\" type=\"text\" value=\"" . $linkText . "\" maxlength=\"255\" name=\"input_collection_link_text_" . $fieldSetup['id'] . "\"></div>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5: // einzelnes bild
|
||||||
|
if ($data != "") {
|
||||||
|
echo "<table cellpadding=\"0\" cellspacing=\"0\">";
|
||||||
|
echo "<tr><td>";
|
||||||
|
echo "<img src=\"" . PATH_ICON_COLLECTION . $data . "?time=" . time() . "\" /></td><td><input type=\"checkbox\" name=\"delete_collection_image_" . $fieldSetup['id'] . '_count'.$fieldCount."\" /> Bild entfernen</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
echo "</table>";
|
||||||
|
}
|
||||||
|
echo "<input id=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "\" class=\"code\" type=\"file\" name=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount."\">";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6: // Dropdown
|
||||||
|
echo "<select style=\"float:left;\" id=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "\" class=\"code\" type=\"text\" name=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount."\" >";
|
||||||
|
//Get all option_values
|
||||||
|
$options = explode(";", $fieldSetup["option_string"]);
|
||||||
|
//Values als Integer
|
||||||
|
$value = 0;
|
||||||
|
$data = unserialize($data);
|
||||||
|
foreach ($options as $option) {
|
||||||
|
$selected_text = ($data == $value) ? " selected=\"selected\"" : "";
|
||||||
|
echo "<option" . $selected_text . " value=\"" . $value . "\">" . $option . "</option>";
|
||||||
|
$value++;
|
||||||
|
}
|
||||||
|
echo "</select>";
|
||||||
|
|
||||||
|
if ($fieldSetup['id'] == 38 || $fieldSetup['id'] == 45 || $fieldSetup['id'] == 57) {
|
||||||
|
echo "<div class=\"dropdownPreview\" data-image=\"" . $fieldSetup['id'] .'_count'.$fieldCount. "\" style=\"float:left\" >dsadas</div>";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7: // Checkbox
|
||||||
|
|
||||||
|
echo "<label id=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "\" class=\"checkbox\" >";
|
||||||
|
//Get all option_values
|
||||||
|
$options = explode(";", $fieldSetup["option_string"]);
|
||||||
|
//Values als Integer
|
||||||
|
$value = 1;
|
||||||
|
foreach ($options as $option) {
|
||||||
|
$selected_text = ($data == 1) ? " checked=\"checked\"" : "";
|
||||||
|
// $selected_text = ($data == $value) ? " checked=\"checked\"" : "";
|
||||||
|
echo "<div class=\"input_collection_link_checkbox\">";
|
||||||
|
echo "<input id=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "_value_" . $value . "\" type=\"checkbox\" name=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "[]\" value=val_\"$value\" ".$selected_text.">";
|
||||||
|
echo "<label " . "for=\"input_collection_link_" . $fieldSetup['id'] .'_count'.$fieldCount. "_value_" . $value . "\">" . $option . "</label>";
|
||||||
|
echo "</div>";
|
||||||
|
$value++;
|
||||||
|
}
|
||||||
|
echo "</label>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: // normales inputfeld
|
||||||
|
default:
|
||||||
|
if($fieldSetup['id'] == 119 || $fieldSetup['id'] == 120){
|
||||||
|
create_collection_azubi_select($data, $fieldSetup['id']);
|
||||||
|
}else if($fieldSetup['id'] == 283){
|
||||||
|
create_collection_person_select($data, $fieldSetup['id']);
|
||||||
|
}else if($fieldSetup['id'] == 115){
|
||||||
|
create_select_from_collection($data, $fieldSetup['id'], 32);
|
||||||
|
}else if($fieldSetup['id'] == 286){
|
||||||
|
create_select_from_collection($data, $fieldSetup['id'], 31);
|
||||||
|
}else {
|
||||||
|
echo "<input id=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount."\" class=\"code\" type=\"text\" value=\"" . htmlspecialchars($data) . "\" maxlength=\"" . $input_maxlength . "\" name=\"input_collection_link_" . $fieldSetup['id'] . '_count'.$fieldCount."\">";
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
echo "</form>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo " </div>";
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
42
module/collection/page_collection_listform.inc.php
Normal file
42
module/collection/page_collection_listform.inc.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php echo $translation->get("assign_collection_list"); ?>
|
||||||
|
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("left", $translation->get("back"), $formname, "loadCard('edit_content_page', true)"); ?>
|
||||||
|
<?= button("link", $translation->get("assoc_with_page"), $formname, "loadCard('assoc_collection_list_page')"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_collection_setup_id" value="" />
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||||
|
<input name="insert_collection_list" type="hidden" value="1">
|
||||||
|
|
||||||
|
<div class="requestLoader"></div>
|
||||||
|
<?
|
||||||
|
$query = "SELECT main_collection_setup.id, description AS '" . $translation->get("description") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from main_collection_setup left join main_admin_user ON main_collection_setup.modified_user = main_admin_user.id where main_language_id = " . (int)$GLOBALS["language"]['id'] . " ORDER BY id asc";
|
||||||
|
$format = array('option', 'text', 'text', 'text');
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
linklist($result, $formname, $format, "input_collection_setup_id", "assoc_collection_list_page");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
281
module/collection/page_collection_preview_cardform.inc.php
Normal file
281
module/collection/page_collection_preview_cardform.inc.php
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_collection_preview_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||||
|
$collection_setup_id = 0;
|
||||||
|
|
||||||
|
// erstelle kollektionen sammeln
|
||||||
|
$collection_setups = array();
|
||||||
|
$query = "SELECT * FROM main_collection_setup WHERE (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "SELECT ms.id, ms.main_language_id, ms.code, ms.description, ms.linked, ms.icon, ms.modified_user, ms.modified_date, ms.all_languages, ms.show_filter FROM main_collection_setup as ms INNER JOIN main_collection_setup_websites as mcsw on ms.id = mcsw.main_collection_setup_id WHERE mcsw.main_site_id = ".$GLOBALS['site']['id']." ";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result)) {
|
||||||
|
$collection_setups[$row['id']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$collections = array();
|
||||||
|
$collection_ids = array();
|
||||||
|
if ($input_line['main_collection_setup_id'] != "") {
|
||||||
|
$query = "SELECT * FROM main_collection WHERE main_collection_setup_id = " . $input_line['main_collection_setup_id'];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
$collections[] = $row['description'];
|
||||||
|
$collection_ids[] = $row['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$active_groups = array();
|
||||||
|
$query = "SELECT main_collection_setup_group_id FROM main_page_collection_group_link WHERE main_page_link_id = " . (int)$input_line["id"];
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
while ($row = @mysqli_fetch_array($result)) {
|
||||||
|
$active_groups[] = $row['main_collection_setup_group_id'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function loadPagesWithCollection( collection_setup_id ) {
|
||||||
|
load_collections(collection_setup_id);
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
if (collection_setup_id == "" || collection_setup_id == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).show();
|
||||||
|
|
||||||
|
// ajax
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("collection_setup_id", collection_setup_id);
|
||||||
|
formData.append("page_link_id", '<?php echo $input_line["id"]; ?>');
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collection_pages_page",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
dataType : 'json',
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.loader', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
$('.collection_pages', $('#<?php echo $formname; ?>')).html(output.page_with_collection_select);
|
||||||
|
$('.collection_preview_group_select_container', $('#<?php echo $formname; ?>')).html(output.collection_preview_group_select);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, exception) {
|
||||||
|
var msg = '';
|
||||||
|
if (jqXHR.status === 0) {
|
||||||
|
msg = 'Not connect.\n Verify Network.';
|
||||||
|
} else if (jqXHR.status == 404) {
|
||||||
|
msg = 'Requested page not found. [404]';
|
||||||
|
} else if (jqXHR.status == 500) {
|
||||||
|
msg = 'Internal Server Error [500].';
|
||||||
|
} else if (exception === 'parsererror') {
|
||||||
|
msg = 'Requested JSON parse failed.';
|
||||||
|
} else if (exception === 'timeout') {
|
||||||
|
msg = 'Time out error.';
|
||||||
|
} else if (exception === 'abort') {
|
||||||
|
msg = 'Ajax request aborted.';
|
||||||
|
} else {
|
||||||
|
msg = 'Uncaught Error.\n' + jqXHR.responseText;
|
||||||
|
}
|
||||||
|
console.log(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_collections( collection_setup_id ) {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).html("");
|
||||||
|
|
||||||
|
var formData = new FormData(jQuery('#<?php echo $formname; ?>')[0]);
|
||||||
|
formData.append("main_collection_setup_id", collection_setup_id);
|
||||||
|
$.ajax({
|
||||||
|
url : "?action=load_collections_page",
|
||||||
|
type : 'POST',
|
||||||
|
data : formData,
|
||||||
|
cache : false,
|
||||||
|
processData: false, // Don't process the files
|
||||||
|
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
|
||||||
|
success : function ( output, status, xhr ) {
|
||||||
|
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
|
||||||
|
window.location.replace("/mysyde/");
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).html(output);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function ( jqXHR, textStatus, errorThrown ) {
|
||||||
|
//console.log('ERRORS: ' + textStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggle_view_type( _type ) {
|
||||||
|
if (_type == 0) {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).show();
|
||||||
|
$('.collection_items_choose', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
} else {
|
||||||
|
$('.collection_list_choose', $('#<?php echo $formname; ?>')).hide();
|
||||||
|
$('.collection_items_choose', $('#<?php echo $formname; ?>')).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_and_close_page_line() {
|
||||||
|
jQuery('#save_and_close', jQuery('#<?php echo $formname; ?>')).val("1");
|
||||||
|
loadCard('save_collection_preview_page', true);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php
|
||||||
|
if (isset($_REQUEST['is_collection_preview']) && $_REQUEST['is_collection_preview'] == 1) {
|
||||||
|
echo $translation->get("assign_collection_preview");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("assign_collection_list");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("left", $translation->get("back"), $formname, "loadCard('edit_content_page', true)"); ?>
|
||||||
|
|
||||||
|
<?= button("save", $translation->get("save"), $formname, "loadCard('save_collection_preview_page', true)"); ?>
|
||||||
|
<?= button("save", $translation->get("save_and_close"), $formname, "save_and_close_page_line();"); ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ($messages !== null) {
|
||||||
|
if ((gettype($messages) == 'array' || gettype($messages) == 'object') && count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if (isset($_REQUEST['is_collection_preview']) && $_REQUEST['is_collection_preview'] == 1): ?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_line["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="0" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
<input name="is_collection_preview" id="is_collection_preview" type="hidden" value="1" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? create_collection_select($collection_setups, $translation->get("choose_collection_type"), "main_collection_setup_id", $input_line, FALSE, TRUE, "loadPagesWithCollection(this.value);"); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<? input_select($translation->get("collection_preview_type"), "main_collection_view_type", $values = array('0', '1'), $value_names = array($translation->get("single_collection"), $translation->get("collection_list")), $input_line["main_collection_view_type"], FALSE, FALSE, 'onchange="toggle_view_type(this.value);"'); ?>
|
||||||
|
<? input_select($translation->get("choose_order"), "main_collection_order", $values = ["sort", "date_asc", "date_desc", "desc_asc", "desc_desc"], $value_names = ["Sortierung", "Datum aufsteigend", "Datum absteigend", "Beschreibung aufsteigend", "Beschreibung absteigend"], $input_line["main_collection_order"], FALSE, FALSE); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
|
||||||
|
<div class="collection_pages">
|
||||||
|
<?
|
||||||
|
create_page_with_collection_select($input_line['main_collection_setup_id'], $translation->get("page_with_collections"), "main_collection_page_list_id", $input_line, FALSE);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($input_line["main_collection_view_type"] == 0) {
|
||||||
|
$display_list_choose = '';
|
||||||
|
$display_item_choose = 'style="display:none;"';
|
||||||
|
} else {
|
||||||
|
$display_item_choose = '';
|
||||||
|
$display_list_choose = 'style="display:none;"';
|
||||||
|
}
|
||||||
|
|
||||||
|
// einzelne kollektion
|
||||||
|
echo "<div class=\"collection_list_choose\" " . $display_list_choose . ">";
|
||||||
|
input_select($translation->get("choose_collection"), "main_collection_id", $values = $collection_ids, $value_names = $collections, $input_line["main_collection_id"], FALSE, FALSE);
|
||||||
|
echo "</div>";
|
||||||
|
|
||||||
|
// kollektionsliste
|
||||||
|
echo "<div class=\"collection_items_choose\" " . $display_item_choose . ">";
|
||||||
|
input($translation->get("collection_list_items"), "main_collection_items", "text", $input_line["main_collection_items"], 255);
|
||||||
|
echo "</div>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="collection_preview_group_select_container">
|
||||||
|
<?php create_collection_preview_group_select($input_line['main_collection_setup_id'], $input_line["id"], $active_groups); ?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="collection_preview_tag_container">
|
||||||
|
<?php create_collection_preview_tags($input_line["id"]); ?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_line["id"] ?>">
|
||||||
|
<input type="hidden" name="get_real_page_link_id" value="0" />
|
||||||
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
<input name="is_collection_list" id="is_collection_list" type="hidden" value="1" />
|
||||||
|
|
||||||
|
<input name="main_collection_id" type="hidden" value="0" />
|
||||||
|
<input name="main_collection_page_list_id" type="hidden" value="0" />
|
||||||
|
<input name="main_collection_items" type="hidden" value="0" />
|
||||||
|
<input name="main_collection_view_type" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<? create_collection_select($collection_setups, $translation->get("choose_collection_type"), "main_collection_setup_id", $input_line, FALSE, TRUE, "loadPagesWithCollection(this.value);"); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<? input_select($translation->get("choose_order"), "main_collection_order", $values = ["sort", "date_asc", "date_desc", "desc_asc", "desc_desc"], $value_names = ["Sortierung", "Datum aufsteigend", "Datum absteigend", "Beschreibung aufsteigend", "Beschreibung absteigend"], $input_line["main_collection_order"], FALSE, FALSE); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<div class="collection_preview_group_select_container">
|
||||||
|
<?php create_collection_preview_group_select($input_line['main_collection_setup_id'], $input_line["id"], $active_groups); ?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="collection_preview_tag_container">
|
||||||
|
<?php create_collection_preview_tags($input_line["id"]); ?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
0
module/collection/show_collection.inc.php
Normal file
0
module/collection/show_collection.inc.php
Normal file
101
module/community_board/community_board_ajax.inc.php
Normal file
101
module/community_board/community_board_ajax.inc.php
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
$currDir = __DIR__;
|
||||||
|
$rootDir = dirname(dirname($currDir));
|
||||||
|
$mysydeDir = $rootDir . '/mysyde';
|
||||||
|
|
||||||
|
require_once($rootDir . '/vendor/autoload.php');
|
||||||
|
require_once($rootDir . "/mysyde/frontend/frontend_functions.inc.php");
|
||||||
|
|
||||||
|
$envDir = $rootDir . '/config';
|
||||||
|
$envFilePath = $envDir . '/.env';
|
||||||
|
if (is_dir($envDir) && file_exists($envFilePath) && is_file($envFilePath) && is_readable($envFilePath)) {
|
||||||
|
$dotenv = new \Dotenv\Dotenv($envDir);
|
||||||
|
$dotenv->load();
|
||||||
|
}
|
||||||
|
$common = $mysydeDir ."/common/common_functions.inc.php";
|
||||||
|
require_once($common);
|
||||||
|
|
||||||
|
$connEnv = (local_environment()) ? $mysydeDir."/dc.config.php" : $mysydeDir."/dc-server.config.php";
|
||||||
|
|
||||||
|
require_once($connEnv);
|
||||||
|
|
||||||
|
db_connect();
|
||||||
|
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
$post_id = $_POST['post_id'];
|
||||||
|
switch ($_POST['action']) {
|
||||||
|
case 'complete_task':
|
||||||
|
complete_task($task_id, $_POST['status']);
|
||||||
|
break;
|
||||||
|
case 'delete_post':
|
||||||
|
delete_post($post_id);
|
||||||
|
break;
|
||||||
|
case 'count_comments':
|
||||||
|
count_comment_ajax($post_id);
|
||||||
|
break;
|
||||||
|
case 'count_likes':
|
||||||
|
count_likes_ajax($post_id);
|
||||||
|
break;
|
||||||
|
case 'update_likes':
|
||||||
|
update_likes($post_id, $_POST['main_contact_id']);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_post($post_id){
|
||||||
|
$query_link = "DELETE FROM community_board_post_category_link WHERE community_board_post_id = ".$post_id;
|
||||||
|
$result_link = @mysqli_query($GLOBALS['mysql_con'], $query_link);
|
||||||
|
|
||||||
|
$query_comment = "DELETE FROM community_board_comment WHERE community_board_post_id = ".$post_id;
|
||||||
|
$result_comment = @mysqli_query($GLOBALS['mysql_con'], $query_comment);
|
||||||
|
|
||||||
|
$query_post = "DELETE FROM community_board_post WHERE id = ".$post_id;
|
||||||
|
$result_post = @mysqli_query($GLOBALS['mysql_con'], $query_post);
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_main_contact($main_contact_id){
|
||||||
|
$query = "SELECT * FROM main_contact WHERE id = ".$main_contact_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$row = @mysqli_fetch_array($result);
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
function count_comment_ajax($post_id){
|
||||||
|
$query = "SELECT * FROM community_board_comment WHERE community_board_post_id = ".$post_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$count = 0;
|
||||||
|
while($row = @mysqli_fetch_array($result)){
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
echo $count;
|
||||||
|
}
|
||||||
|
|
||||||
|
function count_likes_ajax($post_id){
|
||||||
|
$query = "SELECT * FROM community_board_post_likes WHERE community_board_post_id = ".$post_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$count = 0;
|
||||||
|
while($row = @mysqli_fetch_array($result)){
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
echo $count;
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_likes($post_id, $main_contact_id){
|
||||||
|
$query = "SELECT * FROM community_board_post_likes WHERE community_board_post_id = ".$post_id." AND main_contact_id = ".$main_contact_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) >= 1) {
|
||||||
|
$query = "DELETE FROM community_board_post_likes WHERE community_board_post_id = ".$post_id." AND main_contact_id = ".$main_contact_id;
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}else{
|
||||||
|
$query = "INSERT INTO community_board_post_likes
|
||||||
|
(community_board_post_id, main_contact_id)
|
||||||
|
VALUES (
|
||||||
|
'" . $post_id . "',
|
||||||
|
'" . $main_contact_id . "'
|
||||||
|
)";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
134
module/community_board/community_board_category.inc.php
Normal file
134
module/community_board/community_board_category.inc.php
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<?
|
||||||
|
date_default_timezone_set('Europe/Berlin');
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
|
||||||
|
if (isset($custom_action)) {
|
||||||
|
$action = $custom_action;
|
||||||
|
} else {
|
||||||
|
$action = $_REQUEST["action"];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
case 'close_community_board_category':
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'load_community_board_category':
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'new_community_board_category' :
|
||||||
|
require_once("community_board_category_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'edit_community_board_category':
|
||||||
|
edit_community_board_category();
|
||||||
|
break;
|
||||||
|
case 'delete_community_board_category':
|
||||||
|
delete_community_board_category();
|
||||||
|
break;
|
||||||
|
case 'save_community_board_category':
|
||||||
|
save_community_board_category();
|
||||||
|
break;
|
||||||
|
case 'moveup_community_board_category':
|
||||||
|
moveup_community_board_category();
|
||||||
|
break;
|
||||||
|
case 'movedown_community_board_category':
|
||||||
|
movedown_community_board_category();
|
||||||
|
break;
|
||||||
|
case 'update_sortorder_community_board_category':
|
||||||
|
update_sortorder_community_board_category();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit_community_board_category($_id = "") {
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$category_id = $_id;
|
||||||
|
} else {
|
||||||
|
$category_id = $_REQUEST["input_category_id"];
|
||||||
|
}
|
||||||
|
if ($category_id <> '') {
|
||||||
|
$query = "SELECT * FROM community_board_category WHERE id = '" . $category_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_category = @mysqli_fetch_array($result);
|
||||||
|
require_once("community_board_category_cardform.inc.php");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
require_once("community_board_category_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_community_board_category() {
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
if ($_REQUEST["input_category_id"] <> '') {
|
||||||
|
$query = "UPDATE community_board_category SET
|
||||||
|
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "'
|
||||||
|
WHERE id = '" . $_REQUEST["input_category_id"] . "' LIMIT 1";
|
||||||
|
} else {
|
||||||
|
$sorting = @mysqli_fetch_array(@mysqli_query($GLOBALS['mysql_con'], "SELECT MAX(sorting)+1 AS 'newsorting' FROM main_community_board_category"));
|
||||||
|
$sorting = ($sorting["newsorting"] <> "") ? $sorting = $sorting["newsorting"] : $sorting = 1;
|
||||||
|
$query = "INSERT INTO community_board_category (description, sorting) VALUES (
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
|
||||||
|
" . $sorting . "
|
||||||
|
)";
|
||||||
|
}
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if ($_REQUEST['save_and_close'] == 1) {
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
} else {
|
||||||
|
require_once("community_board_category_cordform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_community_board_category() {
|
||||||
|
if ($_REQUEST["input_category_id"] <> '') {
|
||||||
|
$query = "DELETE FROM mcommunity_board_category WHERE id = '" . $_REQUEST["input_category_id"]."'";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveup_community_board_category() {
|
||||||
|
move_community_board_category("<", "DESC", $_POST["input_category_id"]);
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
function movedown_community_board_category() {
|
||||||
|
move_community_board_category(">", "ASC", $_POST["input_category_id"]);
|
||||||
|
require_once("community_board_category_listform.inc.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
function move_community_board_category( $way, $order, $pic_id ) {
|
||||||
|
$query = "SELECT * FROM community_board_category WHERE id = '" . $pic_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$curr_pic = @mysqli_fetch_array($result);
|
||||||
|
}
|
||||||
|
$query = "SELECT * FROM community_board_category WHERE sorting " . $way . " " . $curr_pic["sorting"] . " ORDER BY sorting " . $order . " LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$change_pic = @mysqli_fetch_array($result);
|
||||||
|
}
|
||||||
|
if (($curr_pic["id"] <> '') && ($change_pic["id"] <> '')) {
|
||||||
|
$query = "UPDATE community_board_category SET sorting = " . $change_pic["sorting"] . " WHERE id = " . $curr_pic["id"];
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$query = "UPDATE community_board_category SET sorting = " . $curr_pic["sorting"] . " WHERE id = " . $change_pic["id"];
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_sortorder_community_board_category() {
|
||||||
|
$sorting = 1;
|
||||||
|
foreach ($_POST['linklistid'] as $itemId) {
|
||||||
|
$query = "UPDATE community_board_category SET sorting = " . $sorting . " WHERE id = '" . $itemId."'";
|
||||||
|
var_dump($query);
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
$sorting++;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_choose_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_category["id"] == "") {
|
||||||
|
echo $translation->get("new_community_board_category");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_community_board_category");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('load_community_board_category', true)");
|
||||||
|
|
||||||
|
// Speichern buttons
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_community_board_category', true)");
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_community_board_category', true)");
|
||||||
|
|
||||||
|
if ($input_category["id"] != "") {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_community_board_category', true, '{$translation->get('delete_community_board_category_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_category_id" type="hidden" value="<?= $input_category["id"] ?>" />
|
||||||
|
<input name="input_id" type="hidden" value="<?= $_REQUEST['input_id'] ?>">
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("description"), "input_description", "text", $input_category["description"]) ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$formname = "form_category_list";
|
||||||
|
$inputname = "input_id";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?= button("save", $translation->get("save"), $formname, ""); ?>
|
||||||
|
<?= button("save", $translation->get("save_and_close"), $formname, "backButton()"); ?>
|
||||||
|
</ul>
|
||||||
|
<div id="mainContent">
|
||||||
|
|
||||||
|
<h1><?php echo get_translation('community_board_category'); ?></h1>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_id" type="hidden" value="<?= $input_id ?>">
|
||||||
|
<input type="hidden" class="selected_linklist_row" name="input_category_id" value="" />
|
||||||
|
<input type="hidden" name="fieldtype" value="" />
|
||||||
|
<input type="hidden" name="type_id" value="" />
|
||||||
|
<ul class="toolbar_menu community_board_category new">
|
||||||
|
<?= button("new", $translation->get("new"), $formname, "loadCard('new_community_board_category', true)", "", FALSE); ?>
|
||||||
|
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_community_board_category')", "", FALSE); ?>
|
||||||
|
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_community_board_category', false, '{$translation->get('delete_community_board_category_confirm')}')", "", FALSE); ?>
|
||||||
|
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_community_board_category')", "", FALSE); ?>
|
||||||
|
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_community_board_category')", "", FALSE); ?>
|
||||||
|
</ul>
|
||||||
|
<?php
|
||||||
|
$query = "SELECT * FROM community_board_category ORDER BY sorting ASC";
|
||||||
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||||
|
$num_rows = @mysqli_num_rows($result);
|
||||||
|
if ($num_rows >= 1) {
|
||||||
|
echo " <table data-sortableupdateaction=\"update_sortorder_community_board_category\" cellpadding=0 cellspacing=0 border=0 class=\"linklist sortableTable\">\n";
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_key($translation->get("description"), "");
|
||||||
|
echo format_key("", "");
|
||||||
|
echo "</tr>";
|
||||||
|
echo "<tr>";
|
||||||
|
echo format_seperator("");
|
||||||
|
echo format_seperator("");
|
||||||
|
echo "</tr>";
|
||||||
|
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||||
|
echo " <tr id=\"linklistid_{$row['id']}\" class=\"linklist_content\" data-checked=\"{$checkedRow}\" data-inputname=\"input_id\" data-action=\"edit_community_board_category\" data-inputid=\"{$row['id']}\">\n";
|
||||||
|
echo format_value($row['description'], "input_id");
|
||||||
|
echo format_value("", "sorticon", "sort");
|
||||||
|
echo " </tr>\n";
|
||||||
|
}
|
||||||
|
echo " </table>\n";
|
||||||
|
} else {
|
||||||
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
105
module/community_board/community_board_post.inc.php
Normal file
105
module/community_board/community_board_post.inc.php
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?
|
||||||
|
date_default_timezone_set('Europe/Berlin');
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
$error = FALSE;
|
||||||
|
|
||||||
|
if (isset($custom_action)) {
|
||||||
|
$action = $custom_action;
|
||||||
|
} else {
|
||||||
|
$action = $_REQUEST["action"];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
case 'close_community_board_post':
|
||||||
|
require_once("community_board_post_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'load_community_board_post':
|
||||||
|
require_once("community_board_post_listform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'new_community_board_post' :
|
||||||
|
require_once("community_board_post_cardform.inc.php");
|
||||||
|
break;
|
||||||
|
case 'edit_community_board_post':
|
||||||
|
edit_community_board_post();
|
||||||
|
break;
|
||||||
|
case 'delete_community_board_post':
|
||||||
|
delete_community_board_post();
|
||||||
|
break;
|
||||||
|
case 'save_community_board_post':
|
||||||
|
save_community_board_post();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
require_once("community_board_post_listform.inc.php");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getContactFromID($main_contact_id){
|
||||||
|
$query = "SELECT * FROM main_contact WHERE id = '" . $main_contact_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$main_contact = @mysqli_fetch_array($result);
|
||||||
|
}
|
||||||
|
return $main_contact['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadComments($post_id){
|
||||||
|
$query = "SELECT * FROM community_board_comment WHERE community_board_post_id = '" . $post_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
echo "<div class='community_board_chat'>";
|
||||||
|
echo "<h4>Kommentare</h4>";
|
||||||
|
while ($comment = @mysqli_fetch_array($result)) {
|
||||||
|
echo "<p><strong>".getContactFromID($comment['main_contact_id']).": </strong>".$comment['comment']."</p>";
|
||||||
|
}
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit_community_board_post($_id = "") {
|
||||||
|
if ((int)$_id > 0) {
|
||||||
|
$post_id = $_id;
|
||||||
|
} else {
|
||||||
|
$post_id = $_REQUEST["input_post_id"];
|
||||||
|
}
|
||||||
|
if ($post_id <> '') {
|
||||||
|
$query = "SELECT * FROM community_board_post WHERE id = '" . $post_id . "' LIMIT 1";
|
||||||
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
if (@mysqli_num_rows($result) == 1) {
|
||||||
|
$input_post = @mysqli_fetch_array($result);
|
||||||
|
require_once("community_board_post_cardform.inc.php");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
require_once("community_board_post_cardform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_community_board_post() {
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
|
||||||
|
if ($_REQUEST["input_post_id"] <> '') {
|
||||||
|
$query = "UPDATE community_board_post SET
|
||||||
|
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "'
|
||||||
|
WHERE id = '" . $_REQUEST["input_post_id"] . "' LIMIT 1";
|
||||||
|
} else {
|
||||||
|
$sorting = @mysqli_fetch_array(@mysqli_query($GLOBALS['mysql_con'], "SELECT MAX(sorting)+1 AS 'newsorting' FROM main_community_board_post"));
|
||||||
|
$sorting = ($sorting["newsorting"] <> "") ? $sorting = $sorting["newsorting"] : $sorting = 1;
|
||||||
|
$query = "INSERT INTO community_board_post (description, sorting) VALUES (
|
||||||
|
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
|
||||||
|
" . $sorting . "
|
||||||
|
)";
|
||||||
|
}
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
|
||||||
|
if ($_REQUEST['save_and_close'] == 1) {
|
||||||
|
require_once("community_board_post_listform.inc.php");
|
||||||
|
} else {
|
||||||
|
require_once("community_board_post_cordform.inc.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_community_board_post() {
|
||||||
|
if ($_REQUEST["input_post_id"] <> '') {
|
||||||
|
$query = "DELETE FROM community_board_post WHERE id = '" . $_REQUEST["input_post_id"]."'";
|
||||||
|
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||||
|
}
|
||||||
|
require_once("community_board_post_listform.inc.php");
|
||||||
|
}
|
||||||
65
module/community_board/community_board_post_cardform.inc.php
Normal file
65
module/community_board/community_board_post_cardform.inc.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?
|
||||||
|
$formname = "form_collection_choose_cardform";
|
||||||
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||||
|
$inputname = "input_id";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="overlaycrumb">
|
||||||
|
<?php if ($input_post["id"] == "") {
|
||||||
|
echo $translation->get("new_community_board_post");
|
||||||
|
} else {
|
||||||
|
echo $translation->get("edit_community_board_post");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="toolbar_menu">
|
||||||
|
<?php
|
||||||
|
// Zurueck zur uebersicht
|
||||||
|
button("left", $translation->get("back"), $formname, "loadCard('load_community_board_post', true)");
|
||||||
|
|
||||||
|
// Speichern buttons
|
||||||
|
button("save", $translation->get("save"), $formname, "loadCard('save_community_board_post', true)");
|
||||||
|
button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_community_board_post', true)");
|
||||||
|
|
||||||
|
if ($input_post["id"] != "") {
|
||||||
|
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_community_board_post', true, '{$translation->get('delete_community_board_post_confirm')}')");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($messages !== null) {
|
||||||
|
if (count($messages)) {
|
||||||
|
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$creation_date = new DateTime($input_post["creation_date"]);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||||
|
<input name="input_post_id" type="hidden" value="<?= $input_post["id"] ?>" />
|
||||||
|
<input name="input_id" type="hidden" value="<?= $_REQUEST['input_id'] ?>">
|
||||||
|
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||||
|
|
||||||
|
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<? input($translation->get("title"), "input_title", "text", $input_post["title"]) ?>
|
||||||
|
<? input($translation->get("content"), "input_description", "textarea", $input_post["content"]) ?>
|
||||||
|
<? input($translation->get("creation_date"), "input_creation_date", "text", $creation_date->format('d.m.Y H:i'), 50, TRUE) ?>
|
||||||
|
<? input($translation->get("contact"), "input_creation_contact", "text", getContactFromID($input_post["creation_contact"]), 50, TRUE) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($input_post["id"] != "") {
|
||||||
|
loadComments($input_post['id']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user