Notenupload
93
controller/admin_notenupload.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
require_once("../config.inc.php");
|
||||
|
||||
if(isset($_POST) && $_SERVER['REQUEST_METHOD'] == "POST")
|
||||
{
|
||||
## Dieses Script wird für jede Datei einzeln aufgerufen durch vpb_uploader.js. Bei 3 Dateien, 3x
|
||||
$titel = $_POST['titel'];
|
||||
$verlag = $_POST['verlag'];
|
||||
$anz_lizenzen = $_POST['anz_lizenzen'];
|
||||
$streamlizenz = $_POST['streamlizenz'];
|
||||
|
||||
if (isset($streamlizenz)) {
|
||||
if ($streamlizenz == '1') {
|
||||
$streamlizenz = '1';
|
||||
} else {
|
||||
$streamlizenz = '0';
|
||||
}
|
||||
} else {
|
||||
$streamlizenz = '0';
|
||||
}
|
||||
$datum_file=date("Ymd_His_");
|
||||
#$vpb_file_name = strip_tags($_FILES['upload_file']['name']); //File Name
|
||||
$vpb_file_name = str_replace (array("ä", "ö", "ü", "ß", "Ä", "Ö", "Ü"," "), array("ae", "oe", "ue", "ss", "Ae", "Oe", "Ue", "_"), $_FILES['upload_file']['name']);
|
||||
$originalname = $_FILES['upload_file']['name'];
|
||||
$vpb_file_name = $datum_file.$vpb_file_name;
|
||||
$vpb_file_id = strip_tags($_POST['upload_file_ids']); // File id is gotten from the file name
|
||||
$vpb_file_size = $_FILES['upload_file']['size']; // File Size
|
||||
$vpb_uploaded_files_location = '../media/file_upload/noten/'; //This is the directory where uploaded files are saved on your server
|
||||
$vpb_final_location = $vpb_uploaded_files_location . $vpb_file_name; //Directory to save file plus the file to be saved
|
||||
//Without Validation and does not save filenames in the database
|
||||
|
||||
|
||||
|
||||
if(move_uploaded_file(strip_tags($_FILES['upload_file']['tmp_name']), $vpb_final_location))
|
||||
{
|
||||
$datum=date("Y-m-d H:i:s");
|
||||
$result = $db->query("SELECT jndid
|
||||
FROM jumi_noten_daten
|
||||
WHERE titel = '$titel'
|
||||
AND verlag = '$verlag'
|
||||
AND anz_lizenzen = '$anz_lizenzen'
|
||||
AND streamlizenz = '$streamlizenz'
|
||||
");
|
||||
$row = $result->fetch_array();
|
||||
if($row['jndid'] == ''){
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_daten ( titel
|
||||
, verlag
|
||||
, anz_lizenzen
|
||||
, streamlizenz
|
||||
, uid
|
||||
, datum
|
||||
)
|
||||
VALUES
|
||||
( '$titel'
|
||||
, '$verlag'
|
||||
, '$anz_lizenzen'
|
||||
, '$streamlizenz'
|
||||
, $uid
|
||||
, '$datum'
|
||||
)
|
||||
");
|
||||
$jndid = $db->insert_id;
|
||||
}else{
|
||||
$jndid = $row['jndid'];
|
||||
}
|
||||
|
||||
$sql2 = $db->query("INSERT INTO jumi_noten_uploads ( jndid
|
||||
, filename
|
||||
, originalname
|
||||
, uid
|
||||
, datum
|
||||
)
|
||||
VALUES
|
||||
( $jndid
|
||||
, '$vpb_file_name'
|
||||
, '$originalname'
|
||||
, $uid
|
||||
, '$datum'
|
||||
)
|
||||
");
|
||||
//Display the file id
|
||||
echo $vpb_file_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display general system error
|
||||
echo 'general_system_error';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
20
dashboard/notenupload.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
#$_SESSION['sessionid'] = session_id();
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
require_once("../config.inc.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
if(!rechte('__noright__', $uid)){
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
|
||||
exit;
|
||||
}
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
@ -153,5 +153,5 @@ if ($action == '') {
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/admin/$templatename");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
||||
|
26
dashboard/startseite.php#
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
#$_SESSION['sessionid'] = session_id();
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
require_once("../config.inc.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
if(!rechte(basename(__FILE__), $uid)){
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
|
||||
exit;
|
||||
}
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
|
||||
|
||||
$result_name = $db->query("SELECT vorname, nachname, mail FROM jumi_admin WHERE uid='$uid'");
|
||||
$row_name = $result_name->fetch_array();
|
||||
$smarty->assign('startseite_name', "$row_name[vorname] $row_name[nachname]");
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
320
js/file_upload/vpb_uploader.js
Normal file
@ -0,0 +1,320 @@
|
||||
|
||||
function vpb_multiple_file_uploader(vpb_configuration_settings)
|
||||
{
|
||||
this.vpb_settings = vpb_configuration_settings;
|
||||
this.vpb_files = "";
|
||||
this.vpb_browsed_files = []
|
||||
var self = this;
|
||||
var vpb_msg = "Sorry, your browser does not support this application. Thank You!";
|
||||
|
||||
//Get all browsed file extensions
|
||||
function vpb_file_ext(file) {
|
||||
return (/[.]/.exec(file)) ? /[^.]+$/.exec(file.toLowerCase()) : '';
|
||||
}
|
||||
|
||||
/* Display added files which are ready for upload */
|
||||
//with their file types, names, size, date last modified along with an option to remove an unwanted file
|
||||
vpb_multiple_file_uploader.prototype.vpb_show_added_files = function(vpb_value)
|
||||
{
|
||||
this.vpb_files = vpb_value;
|
||||
if(this.vpb_files.length > 0)
|
||||
{
|
||||
var vpb_added_files_displayer = vpb_file_id = "";
|
||||
for(var i = 0; i<this.vpb_files.length; i++)
|
||||
{
|
||||
//Use the names of the files without their extensions as their ids
|
||||
var files_name_without_extensions = this.vpb_files[i].name.substr(0, this.vpb_files[i].name.lastIndexOf('.')) || this.vpb_files[i].name;
|
||||
vpb_file_id = files_name_without_extensions.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '');
|
||||
|
||||
var vpb_file_to_add = vpb_file_ext(this.vpb_files[i].name);
|
||||
var vpb_class = $("#added_class").val();
|
||||
var vpb_file_icon;
|
||||
|
||||
//Check and display File Size
|
||||
var vpb_fileSize = (this.vpb_files[i].size / 1024);
|
||||
if (vpb_fileSize / 1024 > 1)
|
||||
{
|
||||
if (((vpb_fileSize / 1024) / 1024) > 1)
|
||||
{
|
||||
vpb_fileSize = (Math.round(((vpb_fileSize / 1024) / 1024) * 100) / 100);
|
||||
var vpb_actual_fileSize = vpb_fileSize + " GB";
|
||||
}
|
||||
else
|
||||
{
|
||||
vpb_fileSize = (Math.round((vpb_fileSize / 1024) * 100) / 100)
|
||||
var vpb_actual_fileSize = vpb_fileSize + " MB";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vpb_fileSize = (Math.round(vpb_fileSize * 100) / 100)
|
||||
var vpb_actual_fileSize = vpb_fileSize + " KB";
|
||||
}
|
||||
|
||||
//Check and display the date that files were last modified
|
||||
var vpb_date_last_modified = new Date(this.vpb_files[i].lastModifiedDate);
|
||||
var dd = vpb_date_last_modified.getDate();
|
||||
var mm = vpb_date_last_modified.getMonth() + 1;
|
||||
var yyyy = vpb_date_last_modified.getFullYear();
|
||||
var vpb_date_last_modified_file = dd + '/' + mm + '/' + yyyy;
|
||||
|
||||
//File Display Classes
|
||||
if( vpb_class == 'vpb_blue' ) {
|
||||
var new_classc = 'vpb_white';
|
||||
} else {
|
||||
var new_classc = 'vpb_blue';
|
||||
}
|
||||
|
||||
|
||||
if(typeof this.vpb_files[i] != undefined && this.vpb_files[i].name != "")
|
||||
{
|
||||
//Check for the type of file browsed so as to represent each file with the appropriate file icon
|
||||
|
||||
if( vpb_file_to_add == "jpg" || vpb_file_to_add == "JPG" || vpb_file_to_add == "jpeg" || vpb_file_to_add == "JPEG" || vpb_file_to_add == "gif" || vpb_file_to_add == "GIF" || vpb_file_to_add == "png" || vpb_file_to_add == "PNG" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/images_file.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "doc" || vpb_file_to_add == "docx" || vpb_file_to_add == "rtf" || vpb_file_to_add == "DOC" || vpb_file_to_add == "DOCX" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/doc.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "pdf" || vpb_file_to_add == "PDF" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/pdf.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "txt" || vpb_file_to_add == "TXT" || vpb_file_to_add == "RTF" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/txt.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "php" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/php.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "css" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/general.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "js" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/general.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "html" || vpb_file_to_add == "HTML" || vpb_file_to_add == "htm" || vpb_file_to_add == "HTM" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/html.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "setup" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/setup.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "video" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/video.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "real" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/real.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "psd" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/psd.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "fla" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/fla.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "xls" || vpb_file_to_add == "xlsx" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/xls.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "swf" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/swf.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "eps" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/eps.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "exe" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/exe.gif" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "binary" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/binary.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else if( vpb_file_to_add == "zip" )
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/archive.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
else
|
||||
{
|
||||
vpb_file_icon = '<img src="../media/file_upload_images/general.png" align="absmiddle" border="0" alt="" />';
|
||||
}
|
||||
var split = this.vpb_files[i].name.split('.');
|
||||
var filename = split[0];
|
||||
var extension = split[1];
|
||||
if (filename.length > 15) {
|
||||
filename = filename.substring(0, 10)+'[...]';
|
||||
}
|
||||
var result = filename + '.' + extension;
|
||||
//Assign browsed files to a variable so as to later display them below
|
||||
vpb_added_files_displayer += '<tr id="add_fileID'+vpb_file_id+'" class="'+new_classc+'"><td><div align="left"><span style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:gray;">'+vpb_file_icon+' '+result+'</span></div></td><td><span id="uploading_'+vpb_file_id+'"><span style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:gray;">Uploadbereit</span></span></td><td><div align="right"><span style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:gray;">'+vpb_actual_fileSize+'</span></div></td><td><span id="remove'+vpb_file_id+'"><span class="vpb_files_remove_left_inner" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;" onclick="vpb_remove_this_file(\''+vpb_file_id+'\',\''+this.vpb_files[i].name+'\');">Entfernen</span></span></td></tr></div>';
|
||||
|
||||
}
|
||||
}
|
||||
//Display browsed files on the screen to the user who wants to upload them
|
||||
$("#add_files").append(vpb_added_files_displayer);
|
||||
$("#added_class").val(new_classc);
|
||||
}
|
||||
}
|
||||
|
||||
//File Reader
|
||||
vpb_multiple_file_uploader.prototype.vpb_read_file = function(vpb_e) {
|
||||
if(vpb_e.target.files) {
|
||||
self.vpb_show_added_files(vpb_e.target.files);
|
||||
self.vpb_browsed_files.push(vpb_e.target.files);
|
||||
} else {
|
||||
alert('Sorry, a file you have specified could not be read at the moment. Thank You!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addEvent(type, el, fn){
|
||||
if (window.addEventListener){
|
||||
el.addEventListener(type, fn, false);
|
||||
} else if (window.attachEvent){
|
||||
var f = function(){
|
||||
fn.call(el, window.event);
|
||||
};
|
||||
el.attachEvent('on' + type, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Get the ids of all added files and also start the upload when called
|
||||
vpb_multiple_file_uploader.prototype.vpb_starter = function() {
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob) {
|
||||
var vpb_browsed_file_ids = $("#"+this.vpb_settings.vpb_form_id).find("input[type='file']").eq(0).attr("id");
|
||||
document.getElementById(vpb_browsed_file_ids).addEventListener("change", this.vpb_read_file, false);
|
||||
document.getElementById(this.vpb_settings.vpb_form_id).addEventListener("submit", this.vpb_submit_added_files, true);
|
||||
}
|
||||
else { alert(vpb_msg); }
|
||||
}
|
||||
|
||||
//Call the uploading function when click on the upload button
|
||||
vpb_multiple_file_uploader.prototype.vpb_submit_added_files = function(){ self.vpb_upload_bgin(); }
|
||||
|
||||
//Start uploads
|
||||
vpb_multiple_file_uploader.prototype.vpb_upload_bgin = function() {
|
||||
if(this.vpb_browsed_files.length > 0) {
|
||||
for(var k=0; k<this.vpb_browsed_files.length; k++){
|
||||
var file = this.vpb_browsed_files[k];
|
||||
this.vasPLUS(file,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Main file uploader
|
||||
vpb_multiple_file_uploader.prototype.vasPLUS = function(file,file_counter)
|
||||
{
|
||||
if(typeof file[file_counter] != undefined && file[file_counter] != '')
|
||||
{
|
||||
//Use the file names without their extensions as their ids
|
||||
var files_name_without_extensions = file[file_counter].name.substr(0, file[file_counter].name.lastIndexOf('.')) || file[file_counter].name;
|
||||
var ids = files_name_without_extensions.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '');
|
||||
var vpb_browsed_file_ids = $("#"+this.vpb_settings.vpb_form_id).find("input[type='file']").eq(0).attr("id");
|
||||
|
||||
var removed_file = $("#"+ids).val();
|
||||
|
||||
if ( removed_file != "" && removed_file != undefined && removed_file == ids )
|
||||
{
|
||||
self.vasPLUS(file,file_counter+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
var dataString = new FormData();
|
||||
dataString.append('upload_file',file[file_counter]);
|
||||
dataString.append('upload_file_ids',ids);
|
||||
|
||||
var titel = document.getElementById("titel").value;
|
||||
var verlag = document.getElementById("verlag").value;
|
||||
var anz_lizenzen = document.getElementById("anz_lizenzen").value;
|
||||
var chk_streamlizenz = document.getElementById("streamlizenz");
|
||||
if(chk_streamlizenz.checked == true){
|
||||
var streamlizenz = 1;
|
||||
}else{
|
||||
var streamlizenz = 0;
|
||||
}
|
||||
dataString.append('titel',titel);
|
||||
dataString.append('verlag',verlag);
|
||||
dataString.append('anz_lizenzen',anz_lizenzen);
|
||||
dataString.append('streamlizenz',streamlizenz);
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:this.vpb_settings.vpb_server_url,
|
||||
data:dataString,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function()
|
||||
{
|
||||
$("#uploading_"+ids).html('<div align="left"><img src="../media/file_upload_images/loadings.gif" width="80" align="absmiddle" title="Upload...."/></div>');
|
||||
$("#remove"+ids).html('<div align="center" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:blue;">Uploading...</div>');
|
||||
},
|
||||
success:function(response)
|
||||
{
|
||||
// alert('Wert: '+response);
|
||||
setTimeout(function() {
|
||||
var response_brought = response.indexOf(ids);
|
||||
if ( response_brought != -1) {
|
||||
$("#uploading_"+ids).html('<div align="left" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:blue;">Vollständig</div>');
|
||||
$("#remove"+ids).html('<div align="center" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:gray;">Hochgeladen</div>');
|
||||
} else {
|
||||
var fileType_response_brought = response.indexOf('file_type_error');
|
||||
if ( fileType_response_brought != -1) {
|
||||
|
||||
var filenamewithoutextension = response.replace('file_type_error&', '').substr(0, response.replace('file_type_error&', '').lastIndexOf('.')) || response.replace('file_type_error&', '');
|
||||
var fileID = filenamewithoutextension.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '');
|
||||
$("#uploading_"+fileID).html('<div align="left" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:red;">Invalid File</div>');
|
||||
$("#remove"+fileID).html('<div align="center" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:orange;">Abgebrochen</div>');
|
||||
|
||||
} else {
|
||||
var filesize_response_brought = response.indexOf('file_size_error');
|
||||
if ( filesize_response_brought != -1) {
|
||||
var filenamewithoutextensions = response.replace('file_size_error&', '').substr(0, response.replace('file_size_error&', '').lastIndexOf('.')) || response.replace('file_size_error&', '');
|
||||
var fileID = filenamewithoutextensions.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '');
|
||||
$("#uploading_"+fileID).html('<div align="left" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:red;">Exceeded Size</div>');
|
||||
$("#remove"+fileID).html('<div align="center" style="font-family:Verdana, Geneva, sans-serif;font-size:11px;color:orange;">Abgebrochen</div>');
|
||||
} else {
|
||||
var general_response_brought = response.indexOf('general_system_error');
|
||||
if ( general_response_brought != -1) {
|
||||
alert('Sorry, the file was not uploaded...');
|
||||
}
|
||||
else { /* Do nothing */}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file_counter+1 < file.length ) {
|
||||
self.vasPLUS(file,file_counter+1);
|
||||
}
|
||||
else {}
|
||||
},2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else { alert('Sorry, this system could not verify the identity of the file you were trying to upload at the moment. Thank You!'); }
|
||||
}
|
||||
this.vpb_starter();
|
||||
}
|
||||
|
||||
function vpb_remove_this_file(id, filename)
|
||||
{
|
||||
if(confirm('If you are sure to remove the file: '+filename+' then click on OK otherwise, Cancel it.'))
|
||||
{
|
||||
$("#vpb_removed_files").append('<input type="hidden" id="'+id+'" value="'+id+'">');
|
||||
$("#add_fileID"+id).slideUp();
|
||||
}
|
||||
return false;
|
||||
}
|
BIN
media/file_upload_images/11.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
media/file_upload_images/33.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
media/file_upload_images/archive.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
media/file_upload_images/binary.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
media/file_upload_images/doc.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
media/file_upload_images/eps.gif
Normal file
After Width: | Height: | Size: 379 B |
BIN
media/file_upload_images/exe.gif
Normal file
After Width: | Height: | Size: 608 B |
BIN
media/file_upload_images/fla.gif
Normal file
After Width: | Height: | Size: 393 B |
BIN
media/file_upload_images/general.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
media/file_upload_images/html.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
media/file_upload_images/images_file.gif
Normal file
After Width: | Height: | Size: 597 B |
BIN
media/file_upload_images/loading.gif
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
media/file_upload_images/loadings.gif
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
media/file_upload_images/pdf.gif
Normal file
After Width: | Height: | Size: 272 B |
BIN
media/file_upload_images/php.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
media/file_upload_images/psd.gif
Normal file
After Width: | Height: | Size: 386 B |
BIN
media/file_upload_images/real.gif
Normal file
After Width: | Height: | Size: 267 B |
BIN
media/file_upload_images/setup.gif
Normal file
After Width: | Height: | Size: 190 B |
BIN
media/file_upload_images/sig.gif
Normal file
After Width: | Height: | Size: 243 B |
BIN
media/file_upload_images/swf.gif
Normal file
After Width: | Height: | Size: 399 B |
BIN
media/file_upload_images/txt.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
media/file_upload_images/video.gif
Normal file
After Width: | Height: | Size: 614 B |
BIN
media/file_upload_images/xls.gif
Normal file
After Width: | Height: | Size: 636 B |
90
sql/survey_upload.sql
Normal file
@ -0,0 +1,90 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.1.1
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Erstellungszeit: 31. Mrz 2023 um 13:10
|
||||
-- Server-Version: 10.4.20-MariaDB
|
||||
-- PHP-Version: 8.0.9
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Datenbank: `survey`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `jumi_noten_daten`
|
||||
--
|
||||
|
||||
CREATE TABLE `jumi_noten_daten` (
|
||||
`jndid` int(11) NOT NULL,
|
||||
`titel` varchar(255) COLLATE utf8mb4_bin NOT NULL,
|
||||
`verlag` varchar(255) COLLATE utf8mb4_bin NOT NULL,
|
||||
`anz_lizenzen` int(11) NOT NULL,
|
||||
`streamlizenz` enum('0','1') COLLATE utf8mb4_bin NOT NULL DEFAULT '0',
|
||||
`uid` int(11) NOT NULL,
|
||||
`datum` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `jumi_noten_uploads`
|
||||
--
|
||||
|
||||
CREATE TABLE `jumi_noten_uploads` (
|
||||
`id` int(11) NOT NULL,
|
||||
`jndid` int(11) NOT NULL,
|
||||
`filename` varchar(255) COLLATE utf8mb4_bin NOT NULL,
|
||||
`originalname` varchar(255) COLLATE utf8mb4_bin NOT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`datum` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
--
|
||||
-- Indizes der exportierten Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `jumi_noten_daten`
|
||||
--
|
||||
ALTER TABLE `jumi_noten_daten`
|
||||
ADD PRIMARY KEY (`jndid`);
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `jumi_noten_uploads`
|
||||
--
|
||||
ALTER TABLE `jumi_noten_uploads`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für exportierte Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für Tabelle `jumi_noten_daten`
|
||||
--
|
||||
ALTER TABLE `jumi_noten_daten`
|
||||
MODIFY `jndid` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für Tabelle `jumi_noten_uploads`
|
||||
--
|
||||
ALTER TABLE `jumi_noten_uploads`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
145
templates/modern/dashboard/notenupload.html
Normal file
@ -0,0 +1,145 @@
|
||||
{if $action == ''}
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="Scrollable tab for Bootstrap 5">
|
||||
<meta name="keywords" content="Bootstrap, Bootstrap 5, Tabs">
|
||||
<meta name="author" content="Federico Navarrete">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
<!-- icons in nav-->
|
||||
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
<!-- jQuery UI CSS
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
|
||||
-->
|
||||
<script src="../jquery/jquery-ui.js"></script>
|
||||
<!--<script type="text/javascript" charset="utf-8" language="javascript" src="../js/file_upload/DT_bootstrap.js"></script>-->
|
||||
<script type="text/javascript" src="../js/file_upload/vpb_uploader.js"></script>
|
||||
<script type="text/javascript">$(document).ready(function()
|
||||
{
|
||||
// Call the main function
|
||||
new vpb_multiple_file_uploader
|
||||
({
|
||||
vpb_form_id: "form_id", // Form ID
|
||||
autoSubmit: true,
|
||||
vpb_server_url: "../controller/admin_notenupload.php"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
font-family:Verdana, Geneva, sans-serif;
|
||||
}
|
||||
span{
|
||||
color:red;
|
||||
cursor:pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
function keysave(ele) {
|
||||
if(event.key === 'Enter') {
|
||||
rollesave();
|
||||
}
|
||||
}
|
||||
{/literal}
|
||||
</script>
|
||||
</head>
|
||||
<!--<body onload="if(document.erfassen)document.erfassen.{$umfrageerf_focus}.focus();return false;">-->
|
||||
<body class="sb-nav-fixed">
|
||||
<div id="navtop"></div>
|
||||
{literal}
|
||||
<script>
|
||||
$(function(){
|
||||
// im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht
|
||||
$("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');});
|
||||
$("#navleft").load("nav.php");
|
||||
$("#footer").load("footer.php");
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
<div id="layoutSidenav">
|
||||
<!-- Navigation left -->
|
||||
<div id="navleft"></div>
|
||||
<div id="layoutSidenav_content">
|
||||
<main>
|
||||
<div class="container-fluid">
|
||||
<form name="form_id" id="form_id" action="javascript:void(0);" enctype="multipart/form-data">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-edit me-1"></i>
|
||||
Notenupload
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||
<div class="col-12 col-md-4">Titel:</div>
|
||||
<div class="col-12 col-md-8">
|
||||
<input type="text" id="titel" class="form-control rounded-right" required onkeydown="keysave(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||
<div class="col-12 col-md-4">Verlag:</div>
|
||||
<div class="col-12 col-md-8">
|
||||
<input type="text" id="verlag" class="form-control rounded-right" required onkeydown="keysave(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||
<div class="col-12 col-md-4">Anzahl Lizenzen:</div>
|
||||
<div class="col-12 col-md-8">
|
||||
<input type="text" id="anz_lizenzen" class="form-control rounded-right" required onkeydown="keysave(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||
<div class="col-8 col-md-4">Streamlizenz vorhanden:</div>
|
||||
<div class="col-4 col-md-8">
|
||||
<input class="form-check-input" type="checkbox" name="streamlizenz" id="streamlizenz" value="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
|
||||
<label for="formFile" class="form-label">
|
||||
<div class="col-12 col-md-4">PDF:</div>
|
||||
<div class="col-12col-md-8">
|
||||
<input class="form-control" type="file" name="vasplus_multiple_files" id="vasplus_multiple_files" multiple="multiple">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered" id="add_files">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="color:blue; text-align:center;">Datei</th>
|
||||
<th style="color:blue; text-align:center;">Status</th>
|
||||
<th style="color:blue; text-align:center;">Größe</th>
|
||||
<th style="color:blue; text-align:center;">Aktion</th>
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<p align='center'>
|
||||
<button class="col-6 btn btn-primary btn-sm mt-3" id="save">Speichern</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="msg"></div>
|
||||
</form>
|
||||
</center>
|
||||
</main>
|
||||
<!-- footer -->
|
||||
<div id="footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{/if}
|
@ -93,13 +93,13 @@ $(document).ready(function(){
|
||||
<div class="card-body">
|
||||
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
|
||||
<div class="row mt-0 mb-0">
|
||||
<div class="d-none col-md-10 d-md-block"><b>Rolle</b></div>
|
||||
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
|
||||
<div class="d-none col-md-7 d-md-block"><b>Rolle</b></div>
|
||||
<div class="d-none col-md-5 d-md-block"><b>Aktion</b></div>
|
||||
</div>
|
||||
{section name=table_data loop=$table_data}
|
||||
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
|
||||
<div class="col-6 col-md-10">{$table_data[table_data].bezeichnung}</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<div class="col-6 col-md-7">{$table_data[table_data].bezeichnung}</div>
|
||||
<div class="col-6 col-md-5">
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].rid}|rollenzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-eye" style="width:18px;"></i></a>
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].rid}|userzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-user" style="width:18px;"></i></a>
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delRole({$table_data[table_data].rid})"><i class="fa fa-trash" style="width:18px;"></i></a>
|
||||
|
@ -46,22 +46,22 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- bei mobilen Geäten ausblenden: d-none d-lg-block -->
|
||||
<div class="col-1 d-none d-lg-block"><b>Nr</b></div>
|
||||
<div class="col-5 d-none d-lg-block"><b>Überschrift</b></div>
|
||||
<div class="col-2 d-none d-lg-block"><b>Startdatum</b></div>
|
||||
<div class="col-2 d-none d-lg-block"><b>Enddatum</b></div>
|
||||
<div class="col-2 d-none d-lg-block"><b>Bearbeiten</b></div>
|
||||
<div class="d-none d-lg-block"><b>Nr</b></div>
|
||||
<div class="d-none d-lg-block"><b>Überschrift</b></div>
|
||||
<div class="d-none d-lg-block"><b>Startdatum</b></div>
|
||||
<div class="d-none d-lg-block"><b>Enddatum</b></div>
|
||||
<div class="d-none d-lg-block"><b>Bearbeiten</b></div>
|
||||
</div>
|
||||
{section name=table_data1 loop=$table_data1}
|
||||
<div class="row mt-0 mb-0">
|
||||
<div class="col-1 col-lg-1 mb-2 mb-sm-3">{$smarty.section.table_data1.rownum}</div>
|
||||
<div class="col-9 col-lg-5 mb-2 mb-sm-3">{$table_data1[table_data1].headline}
|
||||
<div class="col-8 col-lg-5 mb-2 mb-sm-3">{$table_data1[table_data1].headline}
|
||||
<div class="d-block d-lg-none">{$table_data1[table_data1].datum_von} -</div>
|
||||
<div class="d-block d-lg-none">{$table_data1[table_data1].datum_bis}</div>
|
||||
</div>
|
||||
<div class="d-none d-lg-block col-lg-2 mb-2 mb-sm-3">{$table_data1[table_data1].datum_von}</div>
|
||||
<div class="d-none d-lg-block col-lg-2 mb-2 mb-sm-3">{$table_data1[table_data1].datum_bis}</div>
|
||||
<div class="col-2 col-lg-2 mb-2 mb-sm-3">
|
||||
<div class="col-3 col-lg-2 mb-2 mb-sm-3">
|
||||
<a href="survey_erfassen.php?edit=1&umid={$table_data1[table_data1].umid}" class="btn btn-primary btn-rounded btn-icon btn-sm"><i class="fa fa-edit" style="width:18px;"></i></a>
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data1[table_data1].umid}" onclick="ShowDetails(this)" data-bs-target="#exampleModal"><i class="fa fa-eye" style="width:18px;"></i></a>
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="onClickDeleteSurvey({$table_data1[table_data1].umid})"><i class="fa fa-trash" style="width:18px;"></i></a>
|
||||
|
114
templates/modern/dashboard/test.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>JU & MI Startseite</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="../bootstrap/node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
<!-- icons in nav-->
|
||||
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
@media only screen and (min-width: 769px) {
|
||||
#div2 {
|
||||
overflow: hidden;
|
||||
background-color: #333;
|
||||
height: 100%;
|
||||
float: right !important;
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
#div2 {
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
background-color:gray;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar a {
|
||||
float: left;
|
||||
display: block;
|
||||
color: #f2f2f2;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.navbar a:hover {
|
||||
background: #f1f1f1;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.navbar a.active {
|
||||
background-color: #04AA6D;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 16px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#div2").resizable({
|
||||
alsoResize: "#main"
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
{/literal}
|
||||
</head>
|
||||
<body>
|
||||
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling" aria-controls="offcanvasScrolling">Toggle bottom offcanvas</button>
|
||||
|
||||
<div class="offcanvas offcanvas-bottom" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="offcanvasScrollingLabel">Colored with scrolling</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<p>Try scrolling the rest of the page to see this option in action.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div2">
|
||||
<a href="#home" class="active">Home</a>
|
||||
<a href="#news">News</a>
|
||||
<a href="#contact">Contact</a>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<h1>Bottom Navigation Bar</h1>
|
||||
<p>Some text some text some text.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|