Edit Zusammenstellung
This commit is contained in:
parent
107fb24ead
commit
fa27a1c82f
@ -3,124 +3,194 @@ require_once("../config.inc.php");
|
||||
$function = $_POST['function'];
|
||||
|
||||
if ($function == 'notenbuchsave') {
|
||||
if (isset($_POST['notenbuch'])) {
|
||||
$notenbuch = $_POST['notenbuch'];
|
||||
}
|
||||
if (isset($_POST['notenbuch'])) {
|
||||
$notenbuch = $_POST['notenbuch'];
|
||||
}
|
||||
if (isset($_POST['var_checkliz'])) {
|
||||
$var_checkliz = $_POST['var_checkliz'];
|
||||
}
|
||||
if (isset($_POST['anz_lizenz'])) {
|
||||
$anz_lizenz = $_POST['anz_lizenz'];
|
||||
}
|
||||
|
||||
$db = dbconnect();
|
||||
$result = $db->query("SELECT count(*) Anz FROM jumi_noten_zusammenstellung WHERE upper(bezeichnung)=upper('$notenbuch')");
|
||||
$row = $result->fetch_array();
|
||||
|
||||
if ($notenbuch == ''){ //verschlüsseltes Passwort überprüfen
|
||||
if (isset($var_checkliz)) {
|
||||
if ($var_checkliz == '1') {
|
||||
$checkliz = '1';
|
||||
} else {
|
||||
$checkliz = '0';
|
||||
}
|
||||
} else {
|
||||
$checkliz = '0';
|
||||
}
|
||||
|
||||
$db = dbconnect();
|
||||
$result = $db->query("SELECT count(*) Anz FROM jumi_noten_zusammenstellung WHERE upper(bezeichnung)=upper('$notenbuch')");
|
||||
$row = $result->fetch_array();
|
||||
|
||||
if ($notenbuch == '') { //verschlüsseltes Passwort überprüfen
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Notenbuchname darf nicht leer sein.</div>|***|error';
|
||||
exit;
|
||||
}else if ($row['Anz'] > 0){ //verschlüsseltes Passwort überprüfen
|
||||
} else if ($row['Anz'] > 0) { //verschlüsseltes Passwort überprüfen
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Notenbuchname ist bereits vorhanden.</div>|***|error';
|
||||
exit;
|
||||
}else{
|
||||
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung ( bezeichnung ) VALUES ( '$notenbuch' )");
|
||||
if($sql1){
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Notenbuchname wurde gespeichert!</div>|***|success';
|
||||
exit;
|
||||
}else{
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Notenbuchname wurde nicht gespeichert: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
} else {
|
||||
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung ( bezeichnung, lizenzpflicht, anzahl_lizenz) VALUES ( '$notenbuch', '$checkliz', $anz_lizenz)");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Das Notenbuch wurde angelegt!</div>|***|success';
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Das Notenbuch wurde nicht angelegt: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($function == 'notenbuchupdate') {
|
||||
if (isset($_POST['notenbuch'])) {
|
||||
$notenbuch = $_POST['notenbuch'];
|
||||
}
|
||||
if (isset($_POST['var_checkliz'])) {
|
||||
$var_checkliz = $_POST['var_checkliz'];
|
||||
}
|
||||
if (isset($_POST['anz_lizenz'])) {
|
||||
$anz_lizenz = $_POST['anz_lizenz'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
|
||||
if (isset($var_checkliz)) {
|
||||
if ($var_checkliz == '1') {
|
||||
$checkliz = '1';
|
||||
} else {
|
||||
$checkliz = '0';
|
||||
$anz_lizenz = '0';
|
||||
}
|
||||
} else {
|
||||
$checkliz = '0';
|
||||
$anz_lizenz = '0';
|
||||
}
|
||||
|
||||
if ($notenbuch == '') { //verschlüsseltes Passwort überprüfen
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Notenbuchname darf nicht leer sein.</div>|***|error';
|
||||
exit;
|
||||
} else {
|
||||
$sql1 = $db->query("UPDATE jumi_noten_zusammenstellung
|
||||
SET bezeichnung ='$notenbuch'
|
||||
,lizenzpflicht='$checkliz'
|
||||
,anzahl_lizenz=$anz_lizenz
|
||||
WHERE zsid = $zsid
|
||||
");
|
||||
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Das Notenbuch wurde geändert!</div>|***|success';
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Das Notenbuch wurde nicht geändert: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($function == 'editNotenbuch') {
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
$result = $db->query("SELECT bezeichnung, lizenzpflicht, anzahl_lizenz FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
|
||||
$row = $result->fetch_array();
|
||||
echo json_encode($row);
|
||||
|
||||
}
|
||||
|
||||
if ($function == 'erfzuordnung') {
|
||||
if (isset($_POST['jndid'])) {
|
||||
$jndid = $_POST['jndid'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
if (isset($_POST['jndid'])) {
|
||||
$jndid = $_POST['jndid'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
|
||||
$db = dbconnect();
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung_zuord ( jndid, zsid) VALUES ( $jndid, $zsid )");
|
||||
if($sql1){
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden zugewiesen!</div>|***|success|***|'.$jndid;
|
||||
exit;
|
||||
}else{
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Noten wurden nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
$db = dbconnect();
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung_zuord ( jndid, zsid) VALUES ( $jndid, $zsid )");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden zugewiesen!</div>|***|success|***|' . $jndid;
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Noten wurden nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($function == 'delzuordnung') {
|
||||
if (isset($_POST['jndid'])) {
|
||||
$jndid = $_POST['jndid'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
if (isset($_POST['jndid'])) {
|
||||
$jndid = $_POST['jndid'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
|
||||
$sql1 = $db->query("DELETE FROM jumi_noten_zusammenstellung_zuord WHERE jndid='$jndid' AND zsid='$zsid'");
|
||||
if($sql1){
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden entfernt!</div>|***|success|***|'.$jndid;
|
||||
exit;
|
||||
}else{
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Noten wurdne nicht entfernt: DELETE Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
$sql1 = $db->query("DELETE FROM jumi_noten_zusammenstellung_zuord WHERE jndid='$jndid' AND zsid='$zsid'");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden entfernt!</div>|***|success|***|' . $jndid;
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Noten wurdne nicht entfernt: DELETE Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($function == 'erfNotenUser') {
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
if (isset($_POST['csid'])) {
|
||||
$csid = $_POST['csid'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
if (isset($_POST['csid'])) {
|
||||
$csid = $_POST['csid'];
|
||||
}
|
||||
|
||||
$db = dbconnect();
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zus_saenger_zuord ( zsid, csid) VALUES ( $zsid, $csid )");
|
||||
if($sql1){
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Benutzer wurde zugewiesen!</div>|***|success|***|'.$zsid;
|
||||
exit;
|
||||
}else{
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Benutzer wurde nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
$db = dbconnect();
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zus_saenger_zuord ( zsid, csid) VALUES ( $zsid, $csid )");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Benutzer wurde zugewiesen!</div>|***|success|***|' . $zsid;
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Benutzer wurde nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($function == 'delNotenUser') {
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
if (isset($_POST['csid'])) {
|
||||
$csid = $_POST['csid'];
|
||||
}
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
if (isset($_POST['csid'])) {
|
||||
$csid = $_POST['csid'];
|
||||
}
|
||||
|
||||
$sql1 = $db->query("DELETE FROM jumi_noten_zus_saenger_zuord WHERE zsid='$zsid' AND csid='$csid'");
|
||||
if($sql1){
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Benutzer wurde gelöscht!</div>|***|success|***|'.$zsid;
|
||||
exit;
|
||||
}else{
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Benutzer wurde nicht gelöscht: DELETE Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
$sql1 = $db->query("DELETE FROM jumi_noten_zus_saenger_zuord WHERE zsid='$zsid' AND csid='$csid'");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Benutzer wurde gelöscht!</div>|***|success|***|' . $zsid;
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Benutzer wurde nicht gelöscht: DELETE Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($function == 'delZusammenstellung') {
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
|
||||
$stmt1 = $db->query("DELETE FROM jumi_noten_zusammenstellung_zuord WHERE zsid= $zsid");
|
||||
$stmt2 = $db->query("DELETE FROM jumi_noten_zus_saenger_zuord WHERE zsid= $zsid");
|
||||
$stmt3 = $db->query("DELETE FROM jumi_noten_zusammenstellung WHERE zsid= $zsid");
|
||||
if ($stmt1 AND $stmt2 AND $stmt3) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Rolle wurde gelöscht!</div>|***|success';
|
||||
exit;
|
||||
if (isset($_POST['zsid'])) {
|
||||
$zsid = $_POST['zsid'];
|
||||
}
|
||||
|
||||
$stmt1 = $db->query("DELETE FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid");
|
||||
$stmt2 = $db->query("DELETE FROM jumi_noten_zus_saenger_zuord WHERE zsid= $zsid");
|
||||
$stmt3 = $db->query("DELETE FROM jumi_noten_zusammenstellung WHERE zsid= $zsid");
|
||||
if ($stmt1 and $stmt2 and $stmt3) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Rolle wurde gelöscht!</div>|***|success';
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Rolle wurde nicht gelöscht: DELETE Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Rolle wurde nicht gelöscht: DELETE Fehler Datenbank.</div>|***|error';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,165 +1,266 @@
|
||||
function notenbuchsave(){
|
||||
var notenbuch = document.getElementById("notenbuchname").value;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'notenbuchsave',
|
||||
'notenbuch': notenbuch
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
function notenbuchsave() {
|
||||
var notenbuch = document.getElementById("notenbuchname").value;
|
||||
var anz_lizenz = document.getElementById("notenbuchlizenz").value;
|
||||
var checkliz = document.getElementById("checkliz");
|
||||
|
||||
if (checkliz.checked == true) {
|
||||
var var_checkliz = 1;
|
||||
} else {
|
||||
var var_checkliz = 0;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'notenbuchsave',
|
||||
'notenbuch': notenbuch,
|
||||
'var_checkliz': var_checkliz,
|
||||
'anz_lizenz': anz_lizenz
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
setTimeout(function() {
|
||||
document.getElementById("notenbuchname").value ="";
|
||||
window.location = "?";
|
||||
}, 1000);
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
document.getElementById("notenbuchname").value = "";
|
||||
window.location = "?";
|
||||
}, 1000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function notenbuchupdate(zsid) {
|
||||
var notenbuch = document.getElementById("notenbuchname").value;
|
||||
var anz_lizenz = document.getElementById("notenbuchlizenz").value;
|
||||
var checkliz = document.getElementById("checkliz");
|
||||
|
||||
if (checkliz.checked == true) {
|
||||
var var_checkliz = 1;
|
||||
} else {
|
||||
var var_checkliz = 0;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'notenbuchupdate',
|
||||
'notenbuch': notenbuch,
|
||||
'var_checkliz': var_checkliz,
|
||||
'zsid': zsid,
|
||||
'anz_lizenz': anz_lizenz
|
||||
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
document.getElementById("notenbuchname").value = "";
|
||||
window.location = "?";
|
||||
}, 1000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function editNotenbuch(zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'editNotenbuch',
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
const obj = JSON.parse(result);
|
||||
var bezeichnung = obj.bezeichnung;
|
||||
var lizenzpflicht = obj.lizenzpflicht;
|
||||
var anzahl_lizenz = obj.anzahl_lizenz;
|
||||
|
||||
document.getElementById('notenbuchname').value = bezeichnung;
|
||||
document.getElementById('save').onclick = function() {
|
||||
notenbuchupdate(zsid)
|
||||
};
|
||||
document.getElementById('save').innerText = 'Update';
|
||||
|
||||
if (lizenzpflicht == 1) {
|
||||
document.getElementById("checkliz").checked = true;
|
||||
document.getElementById('notenbuchlizenz').disabled = false;
|
||||
document.getElementById('notenbuchlizenz').value = anzahl_lizenz;
|
||||
} else {
|
||||
document.getElementById("checkliz").checked = false;
|
||||
document.getElementById('notenbuchlizenz').disabled = true;
|
||||
document.getElementById('notenbuchlizenz').value = '';
|
||||
}
|
||||
|
||||
// if(result!=''){
|
||||
// var a = result.split('|***|');
|
||||
// if(a[1]=="success"){
|
||||
// setTimeout(function() {
|
||||
// document.getElementById("notenbuchname").value ="";
|
||||
// window.location = "?";
|
||||
// }, 1000);
|
||||
// }
|
||||
// $('#msg').show().delay(1000).fadeOut(500);
|
||||
// $('#msg').html(a[0]);
|
||||
// }
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function erfzuordnung(jndid, zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 1000);
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delzuordnung(jndid, zsid) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delzuordnung',
|
||||
'jndid': jndid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 2000);
|
||||
if (a[1] == "success") {
|
||||
setTimeout(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenbuchzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function erfNotenUser(csid, zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'erfNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
$(document).ajaxStop(function(){
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
if (a[1] == "success") {
|
||||
$(document).ajaxStop(function() {
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
}
|
||||
$('#msg').show().delay(5000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delNotenUser(csid, zsid) {
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '../controller/admin_notenbuch.php',
|
||||
data: {
|
||||
'function': 'delNotenUser',
|
||||
'csid': csid,
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
$(document).ajaxStop(function(){
|
||||
if (a[1] == "success") {
|
||||
$(document).ajaxStop(function() {
|
||||
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit='+value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
// Refresh Modal
|
||||
var value = a[2];
|
||||
// load the url and show modal on success
|
||||
$("#ZuordnungModal .modal-body").load('notenuserzuordnung.php?edit=' + value, function() {
|
||||
$("#ZuordnungModal").modal("show");
|
||||
});
|
||||
});
|
||||
}
|
||||
$('#msg').show().delay(10000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -174,20 +275,20 @@ function delZusammenstellung(zsid) {
|
||||
'zsid': zsid
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
var a = result.split('|***|');
|
||||
if(a[1]=="success"){
|
||||
$(document).ajaxStop(function(){
|
||||
window.location = "?";
|
||||
});
|
||||
if (result != '') {
|
||||
var a = result.split('|***|');
|
||||
if (a[1] == "success") {
|
||||
$(document).ajaxStop(function() {
|
||||
window.location = "?";
|
||||
});
|
||||
}
|
||||
$('#msg').show().delay(10000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
$('#msg').show().delay(10000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, exception) {
|
||||
console.log(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -79,6 +79,16 @@ $(document).ready(function(){
|
||||
<div class="col-4 col-md-4">Notenbuchname:</div>
|
||||
<div class="col-8 col-md-8"><input class="form-control" type="text" name="notenbuchname" id="notenbuchname" value="{$umfrageerf_value_frage}" size="60" onkeydown="keysave(this)"></div>
|
||||
</div>
|
||||
<div class="row mt-1 mt-sm-1 mb-1 mb-sm-1">
|
||||
<div class="col-4 col-md-4">Lizenz erfoderlich:</div>
|
||||
<div class="col-8 col-md-8"><input type="checkbox" class="form-check-input" onchange="document.getElementById('notenbuchlizenz').disabled = !this.checked;" name='checkliz' id='checkliz'/></div>
|
||||
</div>
|
||||
<div class="row mt-1 mt-sm-1 mb-1 mb-sm-1">
|
||||
<div class="col-4 col-md-4">Anzahl vorhandene Lizenzen:</div>
|
||||
<div class="col-8 col-md-8"><input class="form-control" type="number" disabled name="notenbuchlizenz" id="notenbuchlizenz" value="{$umfrageerf_value_notenbuchlizenz}" size="60" onkeydown="keysave(this)"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row col-3"></div>
|
||||
@ -101,6 +111,7 @@ $(document).ready(function(){
|
||||
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
|
||||
<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" onclick="editNotenbuch({$table_data[table_data].zsid})"><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_data[table_data].zsid}|notenbuchzuordnung.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].zsid}|notenuserzuordnung.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="delZusammenstellung({$table_data[table_data].zsid})"><i class="fa fa-trash" style="width:18px;"></i></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user