PHPMailer

This commit is contained in:
aschwarz
2023-04-27 17:15:50 +02:00
parent de6abfa26c
commit 1235a0e270
167 changed files with 32558 additions and 22071 deletions

View File

@ -1,51 +1,51 @@
<?php
require_once("../config.inc.php");
//check if form is submitted
if (isset($_POST['submit']))
{
$filename = $_FILES['file1']['name'];
//upload file
if($filename != '')
{
echo $filename;
exit;
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$allowed = ['pdf', 'txt', 'doc', 'docx', 'png', 'jpg', 'jpeg', 'gif', 'xlsx'];
//check if file type is valid
if (in_array($ext, $allowed))
{
// get last record id
$result_name = $db->query("select max(id) as id from jumi_uploads");
if (count($result) > 0)
{
$row = $result->fetch_array()
$filename = ($row['id']+1) . '-' . $filename;
}
else
$filename = '1' . '-' . $filename;
//set target directory
$path = 'uploads/';
$created = @date('Y-m-d H:i:s');
move_uploaded_file($_FILES['file1']['tmp_name'],($path . $filename));
// insert file details into database
$sql = "INSERT INTO jumi_uploads (filename, created) VALUES('$filename', '$created')";
mysqli_query($con, $sql);
header("Location: test2.php?st=success");
}
else
{
header("Location: test2.php?st=error");
}
}
else
header("Location: test2.php");
}
?>
<?php
require_once("../config.inc.php");
//check if form is submitted
if (isset($_POST['submit']))
{
$filename = $_FILES['file1']['name'];
//upload file
if($filename != '')
{
echo $filename;
exit;
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$allowed = ['pdf', 'txt', 'doc', 'docx', 'png', 'jpg', 'jpeg', 'gif', 'xlsx'];
//check if file type is valid
if (in_array($ext, $allowed))
{
// get last record id
$result_name = $db->query("select max(id) as id from jumi_uploads");
if (count($result) > 0)
{
$row = $result->fetch_array()
$filename = ($row['id']+1) . '-' . $filename;
}
else
$filename = '1' . '-' . $filename;
//set target directory
$path = 'uploads/';
$created = @date('Y-m-d H:i:s');
move_uploaded_file($_FILES['file1']['tmp_name'],($path . $filename));
// insert file details into database
$sql = "INSERT INTO jumi_uploads (filename, created) VALUES('$filename', '$created')";
mysqli_query($con, $sql);
header("Location: test2.php?st=success");
}
else
{
header("Location: test2.php?st=error");
}
}
else
header("Location: test2.php");
}
?>

View File

@ -1,47 +1,47 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('__noright__', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
#require_once "func_genUser.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('__noright__', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
#require_once "func_genUser.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,82 +1,82 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
if(isset($_GET['editcsid']) and $_GET['editcsid'] != ''){
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$csid = $_GET['editcsid'];
$smarty->assign('create_edit', $csid);
$result0 = $db->query("SELECT vorname, nachname, mail, singstimme, bemerkung, einw_livestream, einw_homepage, einw_socialmedia, alter16, date_format(selfreg_date, '%d.%m.%y - %H:%i') selfreg_date_form
FROM jumi_chor_saenger
WHERE csid = $csid;");
$row0 = $result0->fetch_array();
$smarty->assign('member_anlegen_vorname', $row0['vorname']);
$smarty->assign('member_anlegen_nachname', $row0['nachname']);
$smarty->assign('member_anlegen_mail', $row0['mail']);
$smarty->assign('member_anlegen_singstimme', $row0['singstimme']);
$smarty->assign('member_anlegen_bemerkung', $row0['bemerkung']);
$smarty->assign('member_anlegen_einw_livestream', $row0['einw_livestream']);
$smarty->assign('member_anlegen_einw_homepage', $row0['einw_homepage']);
$smarty->assign('member_anlegen_einw_socialmedia', $row0['einw_socialmedia']);
$smarty->assign('member_anlegen_alter16', $row0['alter16']);
$smarty->assign('member_anlegen_selfreg_date_form', $row0['selfreg_date_form']);
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_chor_saenger_uploads WHERE csid='$csid' ORDER BY datum DESC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if (file_exists($row['filename'])) {
$row['file_exists'] = '1';
} else {
$row['file_exists'] = '0';
}
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
if(isset($_GET['editcsid']) and $_GET['editcsid'] != ''){
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$csid = $_GET['editcsid'];
$smarty->assign('create_edit', $csid);
$result0 = $db->query("SELECT vorname, nachname, mail, singstimme, bemerkung, einw_livestream, einw_homepage, einw_socialmedia, alter16, date_format(selfreg_date, '%d.%m.%y - %H:%i') selfreg_date_form
FROM jumi_chor_saenger
WHERE csid = $csid;");
$row0 = $result0->fetch_array();
$smarty->assign('member_anlegen_vorname', $row0['vorname']);
$smarty->assign('member_anlegen_nachname', $row0['nachname']);
$smarty->assign('member_anlegen_mail', $row0['mail']);
$smarty->assign('member_anlegen_singstimme', $row0['singstimme']);
$smarty->assign('member_anlegen_bemerkung', $row0['bemerkung']);
$smarty->assign('member_anlegen_einw_livestream', $row0['einw_livestream']);
$smarty->assign('member_anlegen_einw_homepage', $row0['einw_homepage']);
$smarty->assign('member_anlegen_einw_socialmedia', $row0['einw_socialmedia']);
$smarty->assign('member_anlegen_alter16', $row0['alter16']);
$smarty->assign('member_anlegen_selfreg_date_form', $row0['selfreg_date_form']);
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_chor_saenger_uploads WHERE csid='$csid' ORDER BY datum DESC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if (file_exists($row['filename'])) {
$row['file_exists'] = '1';
} else {
$row['file_exists'] = '0';
}
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,116 +1,116 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
#require_once "func_genUser.php";
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen
if(isset($_GET['new']) AND $_GET['new'] == 1){;
$search_prefix = 'anlegen_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
/*
# Daten aufbereiten für Zurückbutton
if(isset($_SESSION["anlegen_vorname"])){
$smarty->assign('user_anlegen_vorname', $_SESSION["anlegen_vorname"]);
}
if(isset($_SESSION["anlegen_nachname"])){
$smarty->assign('user_anlegen_nachname', $_SESSION["anlegen_nachname"]);
}
if(isset($_SESSION["anlegen_mail"])){
$smarty->assign('user_anlegen_mail', $_SESSION["anlegen_mail"]);
}
# Daten aufbereiten für Zurückbutton ENDE
*/
if(isset($_GET['edituid']) and $_GET['edituid'] != ''){
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$uid = $_GET['edituid'];
$smarty->assign('create_edit', $uid);
$result0 = $db->query("SELECT vorname, nachname, mail
FROM jumi_admin
WHERE uid = $uid;");
$row0 = $result0->fetch_array();
$smarty->assign('user_anlegen_vorname', $row0['vorname']);
$smarty->assign('user_anlegen_nachname', $row0['nachname']);
$smarty->assign('user_anlegen_mail', $row0['mail']);
}
$query = "SELECT rid, bezeichnung FROM jumi_admin_rolle ORDER BY bezeichnung ASC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if(isset($_GET['edituid']) and $_GET['edituid'] != ''){
# Aus externer Seite edit_user.php
$uid = $_GET['edituid'];
$result1 = $db->query("SELECT count(*) Anz
FROM jumi_admin_rollen_user_zuord
WHERE uid = $uid
AND rid = $row[rid]");
$row1 = $result1->fetch_array();
if($row1['Anz'] > 0){
$selected = 1;
}else{
$selected = 0;
}
}else{
$selected = 0;
}
$row['selected'] = $selected;
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
#require_once "func_genUser.php";
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen
if(isset($_GET['new']) AND $_GET['new'] == 1){;
$search_prefix = 'anlegen_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
/*
# Daten aufbereiten für Zurückbutton
if(isset($_SESSION["anlegen_vorname"])){
$smarty->assign('user_anlegen_vorname', $_SESSION["anlegen_vorname"]);
}
if(isset($_SESSION["anlegen_nachname"])){
$smarty->assign('user_anlegen_nachname', $_SESSION["anlegen_nachname"]);
}
if(isset($_SESSION["anlegen_mail"])){
$smarty->assign('user_anlegen_mail', $_SESSION["anlegen_mail"]);
}
# Daten aufbereiten für Zurückbutton ENDE
*/
if(isset($_GET['edituid']) and $_GET['edituid'] != ''){
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$uid = $_GET['edituid'];
$smarty->assign('create_edit', $uid);
$result0 = $db->query("SELECT vorname, nachname, mail
FROM jumi_admin
WHERE uid = $uid;");
$row0 = $result0->fetch_array();
$smarty->assign('user_anlegen_vorname', $row0['vorname']);
$smarty->assign('user_anlegen_nachname', $row0['nachname']);
$smarty->assign('user_anlegen_mail', $row0['mail']);
}
$query = "SELECT rid, bezeichnung FROM jumi_admin_rolle ORDER BY bezeichnung ASC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if(isset($_GET['edituid']) and $_GET['edituid'] != ''){
# Aus externer Seite edit_user.php
$uid = $_GET['edituid'];
$result1 = $db->query("SELECT count(*) Anz
FROM jumi_admin_rollen_user_zuord
WHERE uid = $uid
AND rid = $row[rid]");
$row1 = $result1->fetch_array();
if($row1['Anz'] > 0){
$selected = 1;
}else{
$selected = 0;
}
}else{
$selected = 0;
}
$row['selected'] = $selected;
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +1,61 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
$query = "SELECT csid, vorname, nachname, mail,
CASE
WHEN singstimme = 1 THEN 'Sopran'
WHEN singstimme = 2 THEN 'Alt'
WHEN singstimme = 3 THEN 'Tenor'
WHEN singstimme = 4 THEN 'Ba&szlig;'
END singstimme
FROM jumi_chor_saenger ORDER BY nachname ASC, vorname ASC;";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
$query = "SELECT csid, vorname, nachname, mail,
CASE
WHEN singstimme = 1 THEN 'Sopran'
WHEN singstimme = 2 THEN 'Alt'
WHEN singstimme = 3 THEN 'Tenor'
WHEN singstimme = 4 THEN 'Ba&szlig;'
END singstimme
FROM jumi_chor_saenger ORDER BY nachname ASC, vorname ASC;";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,69 +1,69 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
$query = "SELECT a. jndid, titel, anz_lizenzen, streamlizenz, c.bezeichnung verlag
FROM jumi_noten_daten a, jumi_noten_verlag c
WHERE a.vid=c.vid
ORDER BY titel ASC;";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if($row['streamlizenz'] == '1'){
$streamlizenz_vorh = "Ja";
}else{
$streamlizenz_vorh = "Nein";
}
$result_rl = $db->query("SELECT $row[anz_lizenzen]-count(*) Rest
FROM jumi_noten_zusammenstellung_zuord
WHERE jndid = $row[jndid];");
$row_rl = $result_rl->fetch_array();
$row['restlizenz'] = $row_rl['Rest'];
$row['streamlizenz_vorh'] = $streamlizenz_vorh;
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
$query = "SELECT a. jndid, titel, anz_lizenzen, streamlizenz, c.bezeichnung verlag
FROM jumi_noten_daten a, jumi_noten_verlag c
WHERE a.vid=c.vid
ORDER BY titel ASC;";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if($row['streamlizenz'] == '1'){
$streamlizenz_vorh = "Ja";
}else{
$streamlizenz_vorh = "Nein";
}
$result_rl = $db->query("SELECT $row[anz_lizenzen]-count(*) Rest
FROM jumi_noten_zusammenstellung_zuord
WHERE jndid = $row[jndid];");
$row_rl = $result_rl->fetch_array();
$row['restlizenz'] = $row_rl['Rest'];
$row['streamlizenz_vorh'] = $streamlizenz_vorh;
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,99 +1,99 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
#require_once "func_genUser.php";
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen
if(isset($_GET['new']) AND $_GET['new'] == 1){;
$search_prefix = 'anlegen_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
/*
# Daten aufbereiten für Zurückbutton
if(isset($_SESSION["anlegen_vorname"])){
$smarty->assign('user_anlegen_vorname', $_SESSION["anlegen_vorname"]);
}
if(isset($_SESSION["anlegen_nachname"])){
$smarty->assign('user_anlegen_nachname', $_SESSION["anlegen_nachname"]);
}
if(isset($_SESSION["anlegen_mail"])){
$smarty->assign('user_anlegen_mail', $_SESSION["anlegen_mail"]);
}
# Daten aufbereiten für Zurückbutton ENDE
*/
$query = "SELECT uid, vorname, nachname, mail, aktiv FROM jumi_admin ORDER BY nachname ASC, vorname ASC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
# 4 Neu
# 3 Deaktiviert
# 2 Inaktiv
# 1 Aktiv
$result1 = $db->query("SELECT Date_format(max(Datum), '%d.%m.%Y - %H:%i') last_login,
CASE
WHEN max(Datum) IS NULL THEN '4'
WHEN (SELECT aktiv FROM jumi_admin WHERE uid='$row[uid]') = 0 THEN '3'
WHEN max(Datum) < DATE_SUB(now(), INTERVAL 6 MONTH) THEN '2'
WHEN max(Datum) > DATE_SUB(now(), INTERVAL 6 MONTH) THEN '1'
ELSE '5'
END status
FROM jumi_adminlog WHERE uid='$row[uid]'");
$row1 = $result1->fetch_array();
$row['status'] = $row1['status'];
$row['last_login'] = $row1['last_login'];
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
#require_once "func_genUser.php";
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen
if(isset($_GET['new']) AND $_GET['new'] == 1){;
$search_prefix = 'anlegen_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
/*
# Daten aufbereiten für Zurückbutton
if(isset($_SESSION["anlegen_vorname"])){
$smarty->assign('user_anlegen_vorname', $_SESSION["anlegen_vorname"]);
}
if(isset($_SESSION["anlegen_nachname"])){
$smarty->assign('user_anlegen_nachname', $_SESSION["anlegen_nachname"]);
}
if(isset($_SESSION["anlegen_mail"])){
$smarty->assign('user_anlegen_mail', $_SESSION["anlegen_mail"]);
}
# Daten aufbereiten für Zurückbutton ENDE
*/
$query = "SELECT uid, vorname, nachname, mail, aktiv FROM jumi_admin ORDER BY nachname ASC, vorname ASC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
# 4 Neu
# 3 Deaktiviert
# 2 Inaktiv
# 1 Aktiv
$result1 = $db->query("SELECT Date_format(max(Datum), '%d.%m.%Y - %H:%i') last_login,
CASE
WHEN max(Datum) IS NULL THEN '4'
WHEN (SELECT aktiv FROM jumi_admin WHERE uid='$row[uid]') = 0 THEN '3'
WHEN max(Datum) < DATE_SUB(now(), INTERVAL 6 MONTH) THEN '2'
WHEN max(Datum) > DATE_SUB(now(), INTERVAL 6 MONTH) THEN '1'
ELSE '5'
END status
FROM jumi_adminlog WHERE uid='$row[uid]'");
$row1 = $result1->fetch_array();
$row['status'] = $row1['status'];
$row['last_login'] = $row1['last_login'];
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,63 +1,63 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
$query = "SELECT csid, vorname, nachname, einw_livestream, einw_homepage, einw_socialmedia
FROM jumi_chor_saenger ORDER BY nachname ASC, vorname ASC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if(($row['einw_livestream'] == '' AND $row['einw_homepage'] == '' AND $row['einw_socialmedia'] == '') OR ($row['einw_livestream'] == '0' AND $row['einw_homepage'] == '0' AND $row['einw_socialmedia'] == '0')){
$bgcolor='red';
}else{
$bgcolor='';
}
$row['bgcolor'] = $bgcolor;
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
// Rechteüberprüfung
#$db = dbconnect();
#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;}
#// Rechteüberprüfung ende
if(isset($_GET['action'])){
$action = $_GET['action'];
}else{
$action = '';
}
if($action == ''){
$query = "SELECT csid, vorname, nachname, einw_livestream, einw_homepage, einw_socialmedia
FROM jumi_chor_saenger ORDER BY nachname ASC, vorname ASC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if(($row['einw_livestream'] == '' AND $row['einw_homepage'] == '' AND $row['einw_socialmedia'] == '') OR ($row['einw_livestream'] == '0' AND $row['einw_homepage'] == '0' AND $row['einw_socialmedia'] == '0')){
$bgcolor='red';
}else{
$bgcolor='';
}
$row['bgcolor'] = $bgcolor;
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,15 +1,15 @@
<?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();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?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();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,122 +1,122 @@
<?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";
# Gespeicherte Werte
$result_sum = $db->query("SELECT sum(betrag) kontostand
FROM jumi_finanzen
");
$row_sum = $result_sum->fetch_array();
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$kontostand = $fmt->formatCurrency($row_sum['kontostand'], "EUR");
$smarty->assign('kontostand', $kontostand);
$query = "SELECT fid, datum, date_format(datum, '%d.%m.%Y') datum_form, beschreibung, firma, art, betrag, bemerkung
FROM jumi_finanzen
ORDER BY datum DESC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array())
{
$value2 = '';
unset($inner1);
$query2 = "SELECT id, filename, originalname
FROM jumi_finanzen_uploads
WHERE fid=$row[fid]
ORDER BY id ASC
";
$result2 = $db->query($query2) or die("Cannot execute query2");
$ln2 = 0;
while ($row2 = $result2->fetch_array())
{
$inner1[$ln2]['id'] = $row2['id'];
$inner1[$ln2]['filename'] = $row2['filename'];
if (file_exists($row2['filename'])) {
$inner1[$ln2]['file_exists'] = '1';
} else {
$inner1[$ln2]['file_exists'] = '0';
}
$inner1[$ln2]['originalname'] = $row2['originalname'];
$dateiarray = explode(".",$row2['originalname']);
$endung = ".".$dateiarray[count($dateiarray)-1];
$datei_short = substr($row2['originalname'],0,8)."[...]".$endung;
$inner1[$ln2]['originalname_short'] = $datei_short;
$value2 = $inner1;
$ln2++;
}
#$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$betrag = $fmt->formatCurrency($row['betrag'], "EUR");
$row['betrag_form'] = $betrag;
$row['inner'] = $value2;
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
#echo "<pre>";
#print_r($table_data);
#echo "</pre>";
if (isset($_GET['editfid']) and $_GET['editfid'] != '')
{
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$fid = $_GET['editfid'];
$smarty->assign('create_edit', $fid);
$result0 = $db->query("SELECT fid, date_format(datum, '%d.%m.%Y') datum, beschreibung, firma, art, betrag, bemerkung
FROM jumi_finanzen
WHERE fid = $fid
");
$row0 = $result0->fetch_array();
$smarty->assign('finanzen_datum', $row0['datum']);
$smarty->assign('finanzen_beschreibung', $row0['beschreibung']);
$smarty->assign('finanzen_firma', $row0['firma']);
$smarty->assign('finanzen_art', $row0['art']);
if($row0['art'] == 'A'){
$betrag = $row0['betrag'] * (-1);
}else{
$betrag = $row0['betrag'];
}
$smarty->assign('finanzen_betrag', $betrag);
$smarty->assign('finanzen_bemerkung', $row0['bemerkung']);
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_finanzen_uploads WHERE fid='$fid' ORDER BY datum DESC";
$result = $db->query($query) or die("Cannot execute query1");
while ($row10 = $result->fetch_array())
{
$row10['orginalname_short'] = $datei_short;
$value[] = $row10;
}
$smarty->assign('table_data2', $value);
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?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";
# Gespeicherte Werte
$result_sum = $db->query("SELECT sum(betrag) kontostand
FROM jumi_finanzen
");
$row_sum = $result_sum->fetch_array();
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$kontostand = $fmt->formatCurrency($row_sum['kontostand'], "EUR");
$smarty->assign('kontostand', $kontostand);
$query = "SELECT fid, datum, date_format(datum, '%d.%m.%Y') datum_form, beschreibung, firma, art, betrag, bemerkung
FROM jumi_finanzen
ORDER BY datum DESC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array())
{
$value2 = '';
unset($inner1);
$query2 = "SELECT id, filename, originalname
FROM jumi_finanzen_uploads
WHERE fid=$row[fid]
ORDER BY id ASC
";
$result2 = $db->query($query2) or die("Cannot execute query2");
$ln2 = 0;
while ($row2 = $result2->fetch_array())
{
$inner1[$ln2]['id'] = $row2['id'];
$inner1[$ln2]['filename'] = $row2['filename'];
if (file_exists($row2['filename'])) {
$inner1[$ln2]['file_exists'] = '1';
} else {
$inner1[$ln2]['file_exists'] = '0';
}
$inner1[$ln2]['originalname'] = $row2['originalname'];
$dateiarray = explode(".",$row2['originalname']);
$endung = ".".$dateiarray[count($dateiarray)-1];
$datei_short = substr($row2['originalname'],0,8)."[...]".$endung;
$inner1[$ln2]['originalname_short'] = $datei_short;
$value2 = $inner1;
$ln2++;
}
#$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$betrag = $fmt->formatCurrency($row['betrag'], "EUR");
$row['betrag_form'] = $betrag;
$row['inner'] = $value2;
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
#echo "<pre>";
#print_r($table_data);
#echo "</pre>";
if (isset($_GET['editfid']) and $_GET['editfid'] != '')
{
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$fid = $_GET['editfid'];
$smarty->assign('create_edit', $fid);
$result0 = $db->query("SELECT fid, date_format(datum, '%d.%m.%Y') datum, beschreibung, firma, art, betrag, bemerkung
FROM jumi_finanzen
WHERE fid = $fid
");
$row0 = $result0->fetch_array();
$smarty->assign('finanzen_datum', $row0['datum']);
$smarty->assign('finanzen_beschreibung', $row0['beschreibung']);
$smarty->assign('finanzen_firma', $row0['firma']);
$smarty->assign('finanzen_art', $row0['art']);
if($row0['art'] == 'A'){
$betrag = $row0['betrag'] * (-1);
}else{
$betrag = $row0['betrag'];
}
$smarty->assign('finanzen_betrag', $betrag);
$smarty->assign('finanzen_bemerkung', $row0['bemerkung']);
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_finanzen_uploads WHERE fid='$fid' ORDER BY datum DESC";
$result = $db->query($query) or die("Cannot execute query1");
while ($row10 = $result->fetch_array())
{
$row10['orginalname_short'] = $datei_short;
$value[] = $row10;
}
$smarty->assign('table_data2', $value);
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,21 +1,21 @@
<?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");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?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");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,26 +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('__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";
$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");
?>
<?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";
$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");
?>

View File

@ -1,9 +1,9 @@
window.addEventListener('DOMContentLoaded', event => {
// Simple-DataTables
// https://github.com/fiduswriter/Simple-DataTables/wiki
const datatablesSimple = document.getElementById('datatablesSimple');
if (datatablesSimple) {
new simpleDatatables.DataTable(datatablesSimple);
}
});
window.addEventListener('DOMContentLoaded', event => {
// Simple-DataTables
// https://github.com/fiduswriter/Simple-DataTables/wiki
const datatablesSimple = document.getElementById('datatablesSimple');
if (datatablesSimple) {
new simpleDatatables.DataTable(datatablesSimple);
}
});

View File

@ -1,25 +1,25 @@
/*!
* Start Bootstrap - SB Admin v7.0.6 (https://startbootstrap.com/template/sb-admin)
* Copyright 2013-2023 Start Bootstrap
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE)
*/
//
// Scripts
//
// Toggle the side navigation
const sidebarToggle = document.body.querySelector('#sidebarToggle');
if (sidebarToggle) {
// Uncomment Below to persist sidebar toggle between refreshes
// if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
// document.body.classList.toggle('sb-sidenav-toggled');
// }
sidebarToggle.addEventListener('click', event => {
event.preventDefault();
document.body.classList.toggle('sb-sidenav-toggled');
localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
});
}
/*!
* Start Bootstrap - SB Admin v7.0.6 (https://startbootstrap.com/template/sb-admin)
* Copyright 2013-2023 Start Bootstrap
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE)
*/
//
// Scripts
//
// Toggle the side navigation
const sidebarToggle = document.body.querySelector('#sidebarToggle');
if (sidebarToggle) {
// Uncomment Below to persist sidebar toggle between refreshes
// if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
// document.body.classList.toggle('sb-sidenav-toggled');
// }
sidebarToggle.addEventListener('click', event => {
event.preventDefault();
document.body.classList.toggle('sb-sidenav-toggled');
localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
});
}

View File

@ -1,21 +1,21 @@
<?php
## INDEX gegen DB
if(!isset($_SESSION)) { session_start(); }
include_once '../classes/TestProjektSmarty.class_subdir.php';
#require_once("../config.inc.php");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
require_once "../language/german.inc.php";
$action = $_GET['action'];
if($action == ''){
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?php
## INDEX gegen DB
if(!isset($_SESSION)) { session_start(); }
include_once '../classes/TestProjektSmarty.class_subdir.php';
#require_once("../config.inc.php");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
require_once "../language/german.inc.php";
$action = $_GET['action'];
if($action == ''){
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,11 +1,11 @@
<?php
echo "
<form name='logout' action='../controller/admin_login.php' method='POST'<27>>
<input type='hidden' name='function' value='logout'>
</form>
<script type='text/javascript'>
document.logout.submit();
</script>";
exit();
?>
<?php
echo "
<form name='logout' action='../controller/admin_login.php' method='POST'<27>>
<input type='hidden' name='function' value='logout'>
</form>
<script type='text/javascript'>
document.logout.submit();
</script>";
exit();
?>

33
dashboard/mailversand.php Normal file
View File

@ -0,0 +1,33 @@
<?php
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";
# Gespeicherte Rollen
$query = "SELECT rid, bezeichnung
FROM jumi_admin_rolle
ORDER BY bezeichnung ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,121 +1,121 @@
<?php
## INDEX gegen DB
if (!isset($_SESSION)) {
session_start();
}
#$_SESSION['sessionid'] = session_id();
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config/datenbankanbindung.php");
# config.inc.php kann hier nicht eingebunden werden, sonst ruft er in jeder Seite 2x die config auf, da das NAV in jeder Seite geladen wird
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
##############################################################################
$db = dbconnect();
$uid = $_SESSION["userid"];
$query = "SELECT mhid, headline, visible
FROM jumi_menu_headline
WHERE mhid IN (SELECT DISTINCT mhid
FROM jumi_menu_entries a, jumi_admin_rollen_rechte_zuord b, jumi_admin_rollen_user_zuord c
WHERE a.meid=b.meid
AND b.rid=c.rid
AND c.uid=$uid)
ORDER by mhid ASC";
$result = $db->query($query);
// Ergebnisse lesen und an den Client ausgeben
while ($row = $result->fetch_array()) {
$value2 = '';
unset($inner1);
$query2 = "SELECT meid
, headline
, link
, mhid
, fontawesome
, sup
FROM jumi_menu_entries
WHERE mhid=$row[mhid]
AND sup = meid
AND meid IN (SELECT DISTINCT meid
FROM jumi_admin_rollen_rechte_zuord a, jumi_admin_rollen_user_zuord b
WHERE a.rid = b.rid
AND b.uid = $uid)
ORDER BY meid ASC
";
#echo "<br><br><br><br><br><br><br><br>----------------------------------------$query2";
$result2 = $db->query($query2) or die("Cannot execute query2");
$ln2 = 0;
while ($row2 = $result2->fetch_array()) {
$inner1[$ln2]['headline'] = $row2['headline'];
$inner1[$ln2]['link'] = $row2['link'];
$inner1[$ln2]['fontawesome'] = $row2['fontawesome'];
$value3 = '';
unset($inner2);
if ($row2['link'] == '#') {
$query3 = "SELECT meid
, headline
, link
, mhid
, fontawesome
, sup
FROM jumi_menu_entries
WHERE mhid=$row2[mhid]
AND sup != meid
AND sup = $row2[sup]
AND meid IN (SELECT DISTINCT meid
FROM jumi_admin_rollen_rechte_zuord a, jumi_admin_rollen_user_zuord b
WHERE a.rid = b.rid
AND b.uid = $uid)
ORDER BY meid ASC
";
#echo "<br><br><br><br><br><br><br><br>----------------------------------------$query3<br>";
$result3 = $db->query($query3) or die("Cannot execute query3");
$ln3 = 0;
while ($row3 = $result3->fetch_array()) {
$inner2[$ln3]['headline'] = $row3['headline'];
$inner2[$ln3]['link'] = $row3['link'];
$inner2[$ln3]['fontawesome'] = $row3['fontawesome'];
$value3 = $inner2;
$ln3++;
}
$inner1[$ln2]['inner2'] = $value3;
}
$value2 = $inner1;
$ln2++;
}
$row['inner'] = $value2;
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
#echo "<pre>";
#print_r($table_data);
#echo "</pre>";
###############################################################################
$result_name = $db->query("SELECT vorname, nachname, mail FROM jumi_admin WHERE uid='$uid'");
$row_name = $result_name->fetch_array();
$smarty->assign('nav_name', "$row_name[vorname] $row_name[nachname]");
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
<?php
## INDEX gegen DB
if (!isset($_SESSION)) {
session_start();
}
#$_SESSION['sessionid'] = session_id();
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config/datenbankanbindung.php");
# config.inc.php kann hier nicht eingebunden werden, sonst ruft er in jeder Seite 2x die config auf, da das NAV in jeder Seite geladen wird
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
##############################################################################
$db = dbconnect();
$uid = $_SESSION["userid"];
$query = "SELECT mhid, headline, visible
FROM jumi_menu_headline
WHERE mhid IN (SELECT DISTINCT mhid
FROM jumi_menu_entries a, jumi_admin_rollen_rechte_zuord b, jumi_admin_rollen_user_zuord c
WHERE a.meid=b.meid
AND b.rid=c.rid
AND c.uid=$uid)
ORDER by mhid ASC";
$result = $db->query($query);
// Ergebnisse lesen und an den Client ausgeben
while ($row = $result->fetch_array()) {
$value2 = '';
unset($inner1);
$query2 = "SELECT meid
, headline
, link
, mhid
, fontawesome
, sup
FROM jumi_menu_entries
WHERE mhid=$row[mhid]
AND sup = meid
AND meid IN (SELECT DISTINCT meid
FROM jumi_admin_rollen_rechte_zuord a, jumi_admin_rollen_user_zuord b
WHERE a.rid = b.rid
AND b.uid = $uid)
ORDER BY meid ASC
";
#echo "<br><br><br><br><br><br><br><br>----------------------------------------$query2";
$result2 = $db->query($query2) or die("Cannot execute query2");
$ln2 = 0;
while ($row2 = $result2->fetch_array()) {
$inner1[$ln2]['headline'] = $row2['headline'];
$inner1[$ln2]['link'] = $row2['link'];
$inner1[$ln2]['fontawesome'] = $row2['fontawesome'];
$value3 = '';
unset($inner2);
if ($row2['link'] == '#') {
$query3 = "SELECT meid
, headline
, link
, mhid
, fontawesome
, sup
FROM jumi_menu_entries
WHERE mhid=$row2[mhid]
AND sup != meid
AND sup = $row2[sup]
AND meid IN (SELECT DISTINCT meid
FROM jumi_admin_rollen_rechte_zuord a, jumi_admin_rollen_user_zuord b
WHERE a.rid = b.rid
AND b.uid = $uid)
ORDER BY meid ASC
";
#echo "<br><br><br><br><br><br><br><br>----------------------------------------$query3<br>";
$result3 = $db->query($query3) or die("Cannot execute query3");
$ln3 = 0;
while ($row3 = $result3->fetch_array()) {
$inner2[$ln3]['headline'] = $row3['headline'];
$inner2[$ln3]['link'] = $row3['link'];
$inner2[$ln3]['fontawesome'] = $row3['fontawesome'];
$value3 = $inner2;
$ln3++;
}
$inner1[$ln2]['inner2'] = $value3;
}
$value2 = $inner1;
$ln2++;
}
$row['inner'] = $value2;
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
#echo "<pre>";
#print_r($table_data);
#echo "</pre>";
###############################################################################
$result_name = $db->query("SELECT vorname, nachname, mail FROM jumi_admin WHERE uid='$uid'");
$row_name = $result_name->fetch_array();
$smarty->assign('nav_name', "$row_name[vorname] $row_name[nachname]");
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,21 +1,21 @@
<?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");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?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");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,52 +1,52 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
# Gespeicherte Werte
$query = "SELECT zsid, bezeichnung, anzahl_lizenz
FROM jumi_noten_zusammenstellung
ORDER BY bezeichnung ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$result_rl = $db->query("SELECT $row[anzahl_lizenz]-count(*) Rest
FROM jumi_noten_zus_saenger_zuord
WHERE zsid = $row[zsid];");
$row_rl = $result_rl->fetch_array();
$row['restlizenz'] = $row_rl['Rest'];
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
# Gespeicherte Werte
$query = "SELECT zsid, bezeichnung, anzahl_lizenz
FROM jumi_noten_zusammenstellung
ORDER BY bezeichnung ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$result_rl = $db->query("SELECT $row[anzahl_lizenz]-count(*) Rest
FROM jumi_noten_zus_saenger_zuord
WHERE zsid = $row[zsid];");
$row_rl = $result_rl->fetch_array();
$row['restlizenz'] = $row_rl['Rest'];
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,64 +1,64 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$zsid = $_GET['edit'];
$smarty->assign('rollen_edit', $zsid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
$row_head = $result_head->fetch_array();
$smarty->assign('notenbuchzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene Noten
$query = "SELECT jndid, titel
FROM jumi_noten_daten
WHERE jndid NOT IN (SELECT jndid FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid)
ORDER BY jndid ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Noten
$query1 = "SELECT jndid, titel
FROM jumi_noten_daten
WHERE jndid IN (SELECT jndid FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid)
ORDER BY jndid ASC";
$result1 = $db->query($query1) or die("Cannot execute query2");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$zsid = $_GET['edit'];
$smarty->assign('rollen_edit', $zsid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
$row_head = $result_head->fetch_array();
$smarty->assign('notenbuchzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene Noten
$query = "SELECT jndid, titel
FROM jumi_noten_daten
WHERE jndid NOT IN (SELECT jndid FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid)
ORDER BY jndid ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Noten
$query1 = "SELECT jndid, titel
FROM jumi_noten_daten
WHERE jndid IN (SELECT jndid FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid)
ORDER BY jndid ASC";
$result1 = $db->query($query1) or die("Cannot execute query2");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,52 +1,52 @@
<?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";
if(isset($_GET['editjndid']) and $_GET['editjndid'] != ''){
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$jndid = $_GET['editjndid'];
$smarty->assign('create_edit', $jndid);
$result0 = $db->query("SELECT a. jndid, titel, liednr, anz_lizenzen, streamlizenz, c.bezeichnung verlag
FROM jumi_noten_daten a, jumi_noten_verlag c
WHERE a.vid=c.vid
AND a.jndid = $jndid
ORDER BY titel ASC;");
$row0 = $result0->fetch_array();
$smarty->assign('notenupload_titel', $row0['titel']);
$smarty->assign('notenupload_liednr', $row0['liednr']);
$smarty->assign('notenupload_anz_lizenzen', $row0['anz_lizenzen']);
$smarty->assign('notenupload_streamlizenz', $row0['streamlizenz']);
$smarty->assign('notenupload_verlag', $row0['verlag']);
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_noten_uploads WHERE jndid='$jndid' ORDER BY datum DESC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if (file_exists($row['filename'])) {
$row['file_exists'] = '1';
} else {
$row['file_exists'] = '0';
}
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?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";
if(isset($_GET['editjndid']) and $_GET['editjndid'] != ''){
# Aus externer Seite edit_user.php
#echo "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
$jndid = $_GET['editjndid'];
$smarty->assign('create_edit', $jndid);
$result0 = $db->query("SELECT a. jndid, titel, liednr, anz_lizenzen, streamlizenz, c.bezeichnung verlag
FROM jumi_noten_daten a, jumi_noten_verlag c
WHERE a.vid=c.vid
AND a.jndid = $jndid
ORDER BY titel ASC;");
$row0 = $result0->fetch_array();
$smarty->assign('notenupload_titel', $row0['titel']);
$smarty->assign('notenupload_liednr', $row0['liednr']);
$smarty->assign('notenupload_anz_lizenzen', $row0['anz_lizenzen']);
$smarty->assign('notenupload_streamlizenz', $row0['streamlizenz']);
$smarty->assign('notenupload_verlag', $row0['verlag']);
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_noten_uploads WHERE jndid='$jndid' ORDER BY datum DESC";
$result = $db->query( $query)
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if (file_exists($row['filename'])) {
$row['file_exists'] = '1';
} else {
$row['file_exists'] = '0';
}
$value[] = $row;
}
$smarty->assign('table_data', $value);
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,64 +1,64 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$zsid = $_GET['edit'];
$smarty->assign('zusammenstellung_edit', $zsid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
$row_head = $result_head->fetch_array();
$smarty->assign('notenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene User
$query = "SELECT csid, vorname, nachname
FROM jumi_chor_saenger
WHERE csid NOT IN (SELECT csid FROM jumi_noten_zus_saenger_zuord WHERE zsid=$zsid)
ORDER BY nachname ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT csid, vorname, nachname
FROM jumi_chor_saenger
WHERE csid IN (SELECT csid FROM jumi_noten_zus_saenger_zuord WHERE zsid=$zsid)
ORDER BY nachname ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$zsid = $_GET['edit'];
$smarty->assign('zusammenstellung_edit', $zsid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
$row_head = $result_head->fetch_array();
$smarty->assign('notenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene User
$query = "SELECT csid, vorname, nachname
FROM jumi_chor_saenger
WHERE csid NOT IN (SELECT csid FROM jumi_noten_zus_saenger_zuord WHERE zsid=$zsid)
ORDER BY nachname ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT csid, vorname, nachname
FROM jumi_chor_saenger
WHERE csid IN (SELECT csid FROM jumi_noten_zus_saenger_zuord WHERE zsid=$zsid)
ORDER BY nachname ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,21 +1,21 @@
<?php
## INDEX gegen DB
if(!isset($_SESSION)) { session_start(); }
include_once '../classes/TestProjektSmarty.class_subdir.php';
#require_once("../config.inc.php");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
require_once "../language/german.inc.php";
# https://www.php-einfach.de/experte/php-codebeispiele/loginscript/passwort-vergessen/
$action = $_GET['action'];
if($action == ''){
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?php
## INDEX gegen DB
if(!isset($_SESSION)) { session_start(); }
include_once '../classes/TestProjektSmarty.class_subdir.php';
#require_once("../config.inc.php");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
require_once "../language/german.inc.php";
# https://www.php-einfach.de/experte/php-codebeispiele/loginscript/passwort-vergessen/
$action = $_GET['action'];
if($action == ''){
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,39 +1,39 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
#require_once("../config.inc.php");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
require_once "../language/german.inc.php";
$action = $_GET['action'];
if($action == ''){
$uid = $_GET['uid'];
$code = $_GET['code'];
$smarty->assign('uid', "$uid");
$smarty->assign('code', "$code");
if(!isset($_GET['uid']) || !isset($_GET['code'])) {
$smarty->assign('error', 1);
$smarty->assign('error_text', '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Leider wurde beim Aufruf dieser Website kein Code zum Zurücksetzen des Passworts &uuml;bermittelt!</b></div>');
}
# Token: b9b48563d251d9e52bd1352545747e30
# SHA Token: 76eafa7873f2331794036360414bff2473b66fa6
# localhost/survey/dashboard/passwortzuruecksetzen.php?uid=1&code=b9b48563d251d9e52bd1352545747e30
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
/*
# Fuer debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
#echo __LINE__."<br>";
*/
include_once '../classes/TestProjektSmarty.class_subdir.php';
#require_once("../config.inc.php");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
require_once "../language/german.inc.php";
$action = $_GET['action'];
if($action == ''){
$uid = $_GET['uid'];
$code = $_GET['code'];
$smarty->assign('uid', "$uid");
$smarty->assign('code', "$code");
if(!isset($_GET['uid']) || !isset($_GET['code'])) {
$smarty->assign('error', 1);
$smarty->assign('error_text', '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Leider wurde beim Aufruf dieser Website kein Code zum Zurücksetzen des Passworts &uuml;bermittelt!</b></div>');
}
# Token: b9b48563d251d9e52bd1352545747e30
# SHA Token: 76eafa7873f2331794036360414bff2473b66fa6
# localhost/survey/dashboard/passwortzuruecksetzen.php?uid=1&code=b9b48563d251d9e52bd1352545747e30
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,157 +1,157 @@
<?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");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$action = $_GET['action'];
if ($action == '') {
$db = dbconnect();
if(isset($_GET['editumid']) and $_GET['editumid'] != ''){
# Aus externer Seite - survey_edit
$umid = $_GET['editumid'];
}else{
# Sonst Wert einer zuletzt angefangener Umfrage
$query_umid = $db->query("SELECT max(umid) umid
FROM jumi_umfragen
WHERE datum_von < now()
");
$row_umid = $query_umid->fetch_array();
$umid = $row_umid['umid'];
}
$query_umid_detail = $db->query("SELECT headline, date_format(datum_von, '%d.%m.%Y - %H:%i') datum_von, date_format(datum_bis, '%d.%m.%Y - %H:%i') datum_bis, freitext
FROM jumi_umfragen
WHERE umid=$umid
");
$row_umid_detail = $query_umid_detail->fetch_array();
$smarty->assign('result_headline', "$row_umid_detail[headline]");
$smarty->assign('result_datum_von', "$row_umid_detail[datum_von]");
$smarty->assign('result_datum_bis', "$row_umid_detail[datum_bis]");
# Anzahl abgeschlossene Umfragen
$query_fertige = $db->query("SELECT count(*) Anz_abgeschlossen
FROM jumi_umfragen_ende
WHERE umid =$umid
");
$row_fertige = $query_fertige->fetch_array();
$smarty->assign('result_anz_fertige', "$row_fertige[Anz_abgeschlossen]");
# Anzahl angefangener Teilnehmer
$query_angefangen = $db->query("SELECT count(distinct concat(ip,session))-$row_fertige[Anz_abgeschlossen] Anz_angefangen
FROM jumi_umfragen_ergebnisse
WHERE ufid in (select ufid from jumi_umfragen_fragen where umid =$umid)
");
$row_angefangen = $query_angefangen->fetch_array();
$smarty->assign('result_anz_angefangen', "$row_angefangen[Anz_angefangen]");
$query = "SELECT ufid, frage, multiple
FROM jumi_umfragen_fragen
WHERE umid = $umid";
$result = $db->query($query);
// Ergebnisse lesen und an den Client ausgeben
while ($row = $result->fetch_array()) {
$value2 = '';
unset($inner1);
# Wie viele User haben Frage 1 beantwortet
$result_anz_userfrage = $db->query("SELECT count(distinct concat(ip,session)) Anz
FROM jumi_umfragen_ergebnisse
WHERE ufid = $row[ufid]
");
$row_anz_userfrage = $result_anz_userfrage->fetch_array();
# Wie viele Antworten gibt es zur Frage: Das sind 100%
$result_anz_antworten = $db->query("SELECT count(ufid) Anz
FROM jumi_umfragen_ergebnisse
WHERE ufid = $row[ufid]
");
$row_anz_antworten = $result_anz_antworten->fetch_array();
$query2 = "SELECT uaid, antwort
FROM jumi_umfragen_antworten
WHERE ufid=$row[ufid]
ORDER BY userorder ASC, uaid ASC
";
$result2 = $db->query($query2) or die("Cannot execute query2");
$ln2 = 0;
while ($row2 = $result2->fetch_array()) {
# Wie viele haben Antwort auf aktuelle Frage gegeben
$result_cur_antw = $db->query("SELECT count(*) Anz
FROM jumi_umfragen_ergebnisse
WHERE uaid = $row2[uaid]");
$row_cur_antw = $result_cur_antw->fetch_array();
if($row_anz_antworten['Anz'] != '0'){
$prozent = round(100/$row_anz_antworten['Anz']*$row_cur_antw['Anz'],0);
}else{
$prozent = 0;
}
$inner1[$ln2]['prozent'] = $prozent;
$inner1[$ln2]['uaid'] = $row2['uaid'];
$inner1[$ln2]['antwort'] = $row2['antwort'];
$value2 = $inner1;
$ln2++;
}
if($row_anz_userfrage['Anz'] != 0){
$anz_userfrage = $row_anz_userfrage['Anz'];
}else{
$anz_userfrage = 0;
}
$row['inner'] = $value2;
$row['anz_userfrage'] = $anz_userfrage;
$row['anz_antworten_frage'] = $row_anz_antworten['Anz'];
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# echo"<pre>";
# print_r($table_data);
# echo"</pre>";
$query3 = "SELECT freitext
FROM jumi_umfragen_erg_freitext
WHERE umid = $umid
ORDER BY uefid desc";
$result3 = $db->query($query3);
// Ergebnisse lesen und an den Client ausgeben
while ($row3 = $result3->fetch_array()) {
$table_data3[] = $row3;
}
$smarty->assign('table_data3', $table_data3);
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>
<?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");
require_once("../config/datenbankanbindung.php");
$smarty = new SmartyAdmin();
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
$action = $_GET['action'];
if ($action == '') {
$db = dbconnect();
if(isset($_GET['editumid']) and $_GET['editumid'] != ''){
# Aus externer Seite - survey_edit
$umid = $_GET['editumid'];
}else{
# Sonst Wert einer zuletzt angefangener Umfrage
$query_umid = $db->query("SELECT max(umid) umid
FROM jumi_umfragen
WHERE datum_von < now()
");
$row_umid = $query_umid->fetch_array();
$umid = $row_umid['umid'];
}
$query_umid_detail = $db->query("SELECT headline, date_format(datum_von, '%d.%m.%Y - %H:%i') datum_von, date_format(datum_bis, '%d.%m.%Y - %H:%i') datum_bis, freitext
FROM jumi_umfragen
WHERE umid=$umid
");
$row_umid_detail = $query_umid_detail->fetch_array();
$smarty->assign('result_headline', "$row_umid_detail[headline]");
$smarty->assign('result_datum_von', "$row_umid_detail[datum_von]");
$smarty->assign('result_datum_bis', "$row_umid_detail[datum_bis]");
# Anzahl abgeschlossene Umfragen
$query_fertige = $db->query("SELECT count(*) Anz_abgeschlossen
FROM jumi_umfragen_ende
WHERE umid =$umid
");
$row_fertige = $query_fertige->fetch_array();
$smarty->assign('result_anz_fertige', "$row_fertige[Anz_abgeschlossen]");
# Anzahl angefangener Teilnehmer
$query_angefangen = $db->query("SELECT count(distinct concat(ip,session))-$row_fertige[Anz_abgeschlossen] Anz_angefangen
FROM jumi_umfragen_ergebnisse
WHERE ufid in (select ufid from jumi_umfragen_fragen where umid =$umid)
");
$row_angefangen = $query_angefangen->fetch_array();
$smarty->assign('result_anz_angefangen', "$row_angefangen[Anz_angefangen]");
$query = "SELECT ufid, frage, multiple
FROM jumi_umfragen_fragen
WHERE umid = $umid";
$result = $db->query($query);
// Ergebnisse lesen und an den Client ausgeben
while ($row = $result->fetch_array()) {
$value2 = '';
unset($inner1);
# Wie viele User haben Frage 1 beantwortet
$result_anz_userfrage = $db->query("SELECT count(distinct concat(ip,session)) Anz
FROM jumi_umfragen_ergebnisse
WHERE ufid = $row[ufid]
");
$row_anz_userfrage = $result_anz_userfrage->fetch_array();
# Wie viele Antworten gibt es zur Frage: Das sind 100%
$result_anz_antworten = $db->query("SELECT count(ufid) Anz
FROM jumi_umfragen_ergebnisse
WHERE ufid = $row[ufid]
");
$row_anz_antworten = $result_anz_antworten->fetch_array();
$query2 = "SELECT uaid, antwort
FROM jumi_umfragen_antworten
WHERE ufid=$row[ufid]
ORDER BY userorder ASC, uaid ASC
";
$result2 = $db->query($query2) or die("Cannot execute query2");
$ln2 = 0;
while ($row2 = $result2->fetch_array()) {
# Wie viele haben Antwort auf aktuelle Frage gegeben
$result_cur_antw = $db->query("SELECT count(*) Anz
FROM jumi_umfragen_ergebnisse
WHERE uaid = $row2[uaid]");
$row_cur_antw = $result_cur_antw->fetch_array();
if($row_anz_antworten['Anz'] != '0'){
$prozent = round(100/$row_anz_antworten['Anz']*$row_cur_antw['Anz'],0);
}else{
$prozent = 0;
}
$inner1[$ln2]['prozent'] = $prozent;
$inner1[$ln2]['uaid'] = $row2['uaid'];
$inner1[$ln2]['antwort'] = $row2['antwort'];
$value2 = $inner1;
$ln2++;
}
if($row_anz_userfrage['Anz'] != 0){
$anz_userfrage = $row_anz_userfrage['Anz'];
}else{
$anz_userfrage = 0;
}
$row['inner'] = $value2;
$row['anz_userfrage'] = $anz_userfrage;
$row['anz_antworten_frage'] = $row_anz_antworten['Anz'];
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# echo"<pre>";
# print_r($table_data);
# echo"</pre>";
$query3 = "SELECT freitext
FROM jumi_umfragen_erg_freitext
WHERE umid = $umid
ORDER BY uefid desc";
$result3 = $db->query($query3);
// Ergebnisse lesen und an den Client ausgeben
while ($row3 = $result3->fetch_array()) {
$table_data3[] = $row3;
}
$smarty->assign('table_data3', $table_data3);
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");
?>

View File

@ -1,46 +1,46 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
# Gespeicherte Werte
$query = "SELECT rid, bezeichnung
FROM jumi_admin_rolle
ORDER BY bezeichnung ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
# Gespeicherte Werte
$query = "SELECT rid, bezeichnung
FROM jumi_admin_rolle
ORDER BY bezeichnung ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,64 +1,64 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$rid = $_GET['edit'];
$smarty->assign('rollen_edit', $rid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_admin_rolle WHERE rid=$rid");
$row_head = $result_head->fetch_array();
$smarty->assign('rollenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene Rechte
$query = "SELECT meid, headline
FROM jumi_menu_entries
WHERE meid NOT IN (SELECT meid FROM jumi_admin_rollen_rechte_zuord WHERE rid=$rid)
ORDER BY meid ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT meid, headline
FROM jumi_menu_entries
WHERE meid IN (SELECT meid FROM jumi_admin_rollen_rechte_zuord WHERE rid=$rid)
ORDER BY meid ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$rid = $_GET['edit'];
$smarty->assign('rollen_edit', $rid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_admin_rolle WHERE rid=$rid");
$row_head = $result_head->fetch_array();
$smarty->assign('rollenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene Rechte
$query = "SELECT meid, headline
FROM jumi_menu_entries
WHERE meid NOT IN (SELECT meid FROM jumi_admin_rollen_rechte_zuord WHERE rid=$rid)
ORDER BY meid ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT meid, headline
FROM jumi_menu_entries
WHERE meid IN (SELECT meid FROM jumi_admin_rollen_rechte_zuord WHERE rid=$rid)
ORDER BY meid ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,8 +1,8 @@
/**
* Minified by jsDelivr using clean-css v5.3.1.
* Original file: /npm/simple-datatables@7.1.2/dist/style.css
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
.datatable-wrapper.no-header .datatable-container{border-top:1px solid #d9d9d9}.datatable-wrapper.no-footer .datatable-container{border-bottom:1px solid #d9d9d9}.datatable-bottom,.datatable-top{padding:8px 10px}.datatable-bottom>div:first-child,.datatable-bottom>nav:first-child,.datatable-top>div:first-child,.datatable-top>nav:first-child{float:left}.datatable-bottom>div:last-child,.datatable-bottom>nav:last-child,.datatable-top>div:last-child,.datatable-top>nav:last-child{float:right}.datatable-selector{padding:6px}.datatable-input{padding:6px 12px}.datatable-info{margin:7px 0}.datatable-pagination ul{margin:0;padding-left:0}.datatable-pagination li{list-style:none;float:left}.datatable-pagination li.datatable-hidden{visibility:hidden}.datatable-pagination a{border:1px solid transparent;float:left;margin-left:2px;padding:6px 12px;position:relative;text-decoration:none;color:#333;cursor:pointer}.datatable-pagination a:hover{background-color:#d9d9d9}.datatable-pagination .datatable-active a,.datatable-pagination .datatable-active a:focus,.datatable-pagination .datatable-active a:hover{background-color:#d9d9d9;cursor:default}.datatable-pagination .datatable-disabled a,.datatable-pagination .datatable-disabled a:focus,.datatable-pagination .datatable-disabled a:hover,.datatable-pagination .datatable-ellipsis a{pointer-events:none;cursor:default}.datatable-pagination .datatable-disabled a,.datatable-pagination .datatable-disabled a:focus,.datatable-pagination .datatable-disabled a:hover{cursor:not-allowed;opacity:.4}.datatable-pagination .datatable-pagination a{font-weight:700}.datatable-table{max-width:100%;width:100%;border-spacing:0;border-collapse:separate}.datatable-table>tbody>tr>td,.datatable-table>tbody>tr>th,.datatable-table>tfoot>tr>td,.datatable-table>tfoot>tr>th,.datatable-table>thead>tr>td,.datatable-table>thead>tr>th{vertical-align:top;padding:8px 10px}.datatable-table>thead>tr>th{vertical-align:bottom;text-align:left;border-bottom:1px solid #d9d9d9}.datatable-table>tfoot>tr>th{vertical-align:bottom;text-align:left;border-top:1px solid #d9d9d9}.datatable-table th{vertical-align:bottom;text-align:left}.datatable-table th a{text-decoration:none;color:inherit}.datatable-filter,.datatable-sorter{display:inline-block;height:100%;position:relative;width:100%}.datatable-sorter::after,.datatable-sorter::before{content:"";height:0;width:0;position:absolute;right:4px;border-left:4px solid transparent;border-right:4px solid transparent;opacity:.2}.datatable-sorter::before{border-top:4px solid #000;bottom:0}.datatable-sorter::after{border-bottom:4px solid #000;border-top:4px solid transparent;top:0}.datatable-ascending .datatable-filter::after,.datatable-ascending .datatable-sorter::after,.datatable-descending .datatable-filter::before,.datatable-descending .datatable-sorter::before{opacity:.6}.datatable-filter::before{content:"";position:absolute;right:4px;opacity:.2;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-radius:50%;border-top:10px solid #000;top:25%}.datatable-filter-active .datatable-filter::before{opacity:.6}.datatable-empty{text-align:center}.datatable-bottom::after,.datatable-top::after{clear:both;content:" ";display:table}table.datatable-table:focus tr.datatable-cursor>td:first-child{border-left:3px #00f solid}table.datatable-table:focus{outline:solid 1px black;outline-offset:-1px}
/**
* Minified by jsDelivr using clean-css v5.3.1.
* Original file: /npm/simple-datatables@7.1.2/dist/style.css
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
.datatable-wrapper.no-header .datatable-container{border-top:1px solid #d9d9d9}.datatable-wrapper.no-footer .datatable-container{border-bottom:1px solid #d9d9d9}.datatable-bottom,.datatable-top{padding:8px 10px}.datatable-bottom>div:first-child,.datatable-bottom>nav:first-child,.datatable-top>div:first-child,.datatable-top>nav:first-child{float:left}.datatable-bottom>div:last-child,.datatable-bottom>nav:last-child,.datatable-top>div:last-child,.datatable-top>nav:last-child{float:right}.datatable-selector{padding:6px}.datatable-input{padding:6px 12px}.datatable-info{margin:7px 0}.datatable-pagination ul{margin:0;padding-left:0}.datatable-pagination li{list-style:none;float:left}.datatable-pagination li.datatable-hidden{visibility:hidden}.datatable-pagination a{border:1px solid transparent;float:left;margin-left:2px;padding:6px 12px;position:relative;text-decoration:none;color:#333;cursor:pointer}.datatable-pagination a:hover{background-color:#d9d9d9}.datatable-pagination .datatable-active a,.datatable-pagination .datatable-active a:focus,.datatable-pagination .datatable-active a:hover{background-color:#d9d9d9;cursor:default}.datatable-pagination .datatable-disabled a,.datatable-pagination .datatable-disabled a:focus,.datatable-pagination .datatable-disabled a:hover,.datatable-pagination .datatable-ellipsis a{pointer-events:none;cursor:default}.datatable-pagination .datatable-disabled a,.datatable-pagination .datatable-disabled a:focus,.datatable-pagination .datatable-disabled a:hover{cursor:not-allowed;opacity:.4}.datatable-pagination .datatable-pagination a{font-weight:700}.datatable-table{max-width:100%;width:100%;border-spacing:0;border-collapse:separate}.datatable-table>tbody>tr>td,.datatable-table>tbody>tr>th,.datatable-table>tfoot>tr>td,.datatable-table>tfoot>tr>th,.datatable-table>thead>tr>td,.datatable-table>thead>tr>th{vertical-align:top;padding:8px 10px}.datatable-table>thead>tr>th{vertical-align:bottom;text-align:left;border-bottom:1px solid #d9d9d9}.datatable-table>tfoot>tr>th{vertical-align:bottom;text-align:left;border-top:1px solid #d9d9d9}.datatable-table th{vertical-align:bottom;text-align:left}.datatable-table th a{text-decoration:none;color:inherit}.datatable-filter,.datatable-sorter{display:inline-block;height:100%;position:relative;width:100%}.datatable-sorter::after,.datatable-sorter::before{content:"";height:0;width:0;position:absolute;right:4px;border-left:4px solid transparent;border-right:4px solid transparent;opacity:.2}.datatable-sorter::before{border-top:4px solid #000;bottom:0}.datatable-sorter::after{border-bottom:4px solid #000;border-top:4px solid transparent;top:0}.datatable-ascending .datatable-filter::after,.datatable-ascending .datatable-sorter::after,.datatable-descending .datatable-filter::before,.datatable-descending .datatable-sorter::before{opacity:.6}.datatable-filter::before{content:"";position:absolute;right:4px;opacity:.2;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-radius:50%;border-top:10px solid #000;top:25%}.datatable-filter-active .datatable-filter::before{opacity:.6}.datatable-empty{text-align:center}.datatable-bottom::after,.datatable-top::after{clear:both;content:" ";display:table}table.datatable-table:focus tr.datatable-cursor>td:first-child{border-left:3px #00f solid}table.datatable-table:focus{outline:solid 1px black;outline-offset:-1px}
/*# sourceMappingURL=/sm/7faebb93ab083e20bf71c693c970b2206a78620f4a20eb890eeaee129d14cd66.map */

View File

@ -1,231 +1,231 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
# echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
# exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
$query1 = "SELECT umid, date_format(datum_von, '%d.%m.%Y (%H:%i)') datum_von, date_format(datum_bis, '%d.%m.%Y (%H:%i)') datum_bis, headline
FROM jumi_umfragen
ORDER BY umid DESC";
$result1 = $db->query($query1) or die("Cannot execute query1a");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
if ($action == 'fragen') {
$umid = $_SESSION["umfrageerf_umid"];
# Focus/Session setzen
$result = $db->query("SELECT count(*) Anz FROM jumi_umfragen_fragen WHERE umid='$umid'");
$row = $result->fetch_array();
# Wenn man bei mehreren Fragen eine Frage löscht ist Anz nicht 0 und der Focus sitzt bei Antwort
if ($umid == '' or $_GET['tabufid'] == "neuefrage" or $row['Anz'] == '0') {
$smarty->assign('umfrageerf_focus', "frage");
unset($_SESSION["umfrageerf_ufid"]);
unset($_SESSION["umfrageerf_uaid"]);
} else {
$smarty->assign('umfrageerf_focus', "antwort");
}
if (isset($_POST['datumvon']) and $_POST['datumvon'] != '') {
$datumvon = $_POST['datumvon'];
$_SESSION["umfrageerf_value_datumvon"] = $datumvon;
} else {
if ($_SESSION["umfrageerf_value_datumvon"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"3; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$datumvon = $_SESSION["umfrageerf_value_datumvon"];
}
if (isset($_POST['zeitvon']) and $_POST['zeitvon'] != '') {
$zeitvon = $_POST['zeitvon'];
$_SESSION["umfrageerf_value_zeitvon"] = $zeitvon;
} else {
if ($_SESSION["umfrageerf_value_zeitvon"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$zeitvon = $_SESSION["umfrageerf_value_zeitvon"];
}
if (isset($_POST['datumbis']) and $_POST['datumbis'] != '') {
$datumbis = $_POST['datumbis'];
$_SESSION["umfrageerf_value_datumbis"] = $datumbis;
} else {
if ($_SESSION["umfrageerf_value_datumbis"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$datumbis = $_SESSION["umfrageerf_value_datumbis"];
}
if (isset($_POST['zeitbis']) and $_POST['zeitbis'] != '') {
$zeitbis = $_POST['zeitbis'];
$_SESSION["umfrageerf_value_zeitbis"] = $zeitbis;
} else {
if ($_SESSION["umfrageerf_value_zeitbis"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$zeitbis = $_SESSION["umfrageerf_value_zeitbis"];
}
if (isset($_POST['headline']) and trim($_POST['headline']) != '') {
$headline = trim($_POST['headline']);
$_SESSION["umfrageerf_value_headline"] = $headline;
} else {
if ($_SESSION["umfrageerf_value_headline"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$headline = $_SESSION["umfrageerf_value_headline"];
}
if(!isset($_GET['erfassen'])){
if (isset($_POST['freitext']) and trim($_POST['freitext']) != '') {
$freitext = '1';
$_SESSION["umfrageerf_value_freitext"] = $freitext;
}else{
$freitext = '0';
$_SESSION["umfrageerf_value_freitext"] = $freitext;
}
}else{
$freitext = $_SESSION["umfrageerf_value_freitext"];
}
$datumvon_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $datumvon);
$datumbis_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $datumbis);
$datum_von = $datumvon_form . " " . $zeitvon . ":00";
$datum_bis = $datumbis_form . " " . $zeitbis . ":00";
function validateDate($date, $format = 'Y-m-d')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
if (!validateDate($datumvon_form)) {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=2\">";
exit;
}
if (!validateDate($datumbis_form)) {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=2\">";
exit;
}
if(!isset($_GET['erfassen'])){
if ($umid == '') {
$datum = date("Y-m-d H:i:s");
$sql1 = $db->query("INSERT INTO jumi_umfragen ( datum_von
, datum_bis
, headline
, uid
, datum_erfasst
, freitext
)
VALUES
( '$datum_von'
, '$datum_bis'
, '$headline'
, '$uid'
, '$datum'
, '$freitext'
)
");
$umid = $db->insert_id;
$_SESSION["umfrageerf_umid"] = $umid;
}else{
$update = $db->query("UPDATE jumi_umfragen
SET datum_von ='$datum_von'
,datum_bis ='$datum_bis'
,headline = '$headline'
,freitext = '$freitext'
WHERE umid = $umid
");
}
}
if (isset($_GET['tabufid']) and $_GET['tabufid'] != '') {
if ($_GET['tabufid'] == "neuefrage") {
$_SESSION["umfrageerf_ufid"] = "";
} else {
$_SESSION["umfrageerf_ufid"] = $_GET['tabufid'];
}
}
$ufid = $_SESSION["umfrageerf_ufid"];
if ($ufid != '') {
$result_frage = $db->query("SELECT frage, multiple
FROM jumi_umfragen_fragen
WHERE ufid = $ufid");
$row_frage = $result_frage->fetch_array();
$smarty->assign('umfrageerf_value_frage', htmlspecialchars($row_frage['frage']));
$smarty->assign('umfrageerf_value_multiple', $row_frage['multiple']);
$smarty->assign('umfrageerf_value_ufid', $ufid);
}
# Gespeicherte Werte
if ($umid != '') {
$query1 = "SELECT ufid, frage
FROM jumi_umfragen_fragen
WHERE umid=$umid
ORDER BY ufid ASC";
$result1 = $db->query($query1) or die("Cannot execute query1a");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
}
$smarty->assign('table_data1', $table_data1);
if ($ufid != '') {
$smarty->assign('umfrageerf_gesp_werte_value_ufid2', "$ufid");
$query2 = "SELECT uaid, antwort
FROM jumi_umfragen_antworten
WHERE ufid=$ufid
ORDER BY userorder ASC, uaid ASC";
$result2 = $db->query($query2) or die("Cannot execute query2");
$anzahl = $result2->num_rows;
$smarty->assign('table_data2_anz', $anzahl);
while ($row2 = $result2->fetch_array()) {
$table_data2[] = $row2;
}
$smarty->assign('table_data2', $table_data2);
}
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
$_SESSION['cur_page'] = $_SERVER['PHP_SELF']; // Fals man Seite direkt aufruft und Autologin funktioniert
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
# echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
# exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
$query1 = "SELECT umid, date_format(datum_von, '%d.%m.%Y (%H:%i)') datum_von, date_format(datum_bis, '%d.%m.%Y (%H:%i)') datum_bis, headline
FROM jumi_umfragen
ORDER BY umid DESC";
$result1 = $db->query($query1) or die("Cannot execute query1a");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
if ($action == 'fragen') {
$umid = $_SESSION["umfrageerf_umid"];
# Focus/Session setzen
$result = $db->query("SELECT count(*) Anz FROM jumi_umfragen_fragen WHERE umid='$umid'");
$row = $result->fetch_array();
# Wenn man bei mehreren Fragen eine Frage löscht ist Anz nicht 0 und der Focus sitzt bei Antwort
if ($umid == '' or $_GET['tabufid'] == "neuefrage" or $row['Anz'] == '0') {
$smarty->assign('umfrageerf_focus', "frage");
unset($_SESSION["umfrageerf_ufid"]);
unset($_SESSION["umfrageerf_uaid"]);
} else {
$smarty->assign('umfrageerf_focus', "antwort");
}
if (isset($_POST['datumvon']) and $_POST['datumvon'] != '') {
$datumvon = $_POST['datumvon'];
$_SESSION["umfrageerf_value_datumvon"] = $datumvon;
} else {
if ($_SESSION["umfrageerf_value_datumvon"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"3; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$datumvon = $_SESSION["umfrageerf_value_datumvon"];
}
if (isset($_POST['zeitvon']) and $_POST['zeitvon'] != '') {
$zeitvon = $_POST['zeitvon'];
$_SESSION["umfrageerf_value_zeitvon"] = $zeitvon;
} else {
if ($_SESSION["umfrageerf_value_zeitvon"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$zeitvon = $_SESSION["umfrageerf_value_zeitvon"];
}
if (isset($_POST['datumbis']) and $_POST['datumbis'] != '') {
$datumbis = $_POST['datumbis'];
$_SESSION["umfrageerf_value_datumbis"] = $datumbis;
} else {
if ($_SESSION["umfrageerf_value_datumbis"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$datumbis = $_SESSION["umfrageerf_value_datumbis"];
}
if (isset($_POST['zeitbis']) and $_POST['zeitbis'] != '') {
$zeitbis = $_POST['zeitbis'];
$_SESSION["umfrageerf_value_zeitbis"] = $zeitbis;
} else {
if ($_SESSION["umfrageerf_value_zeitbis"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$zeitbis = $_SESSION["umfrageerf_value_zeitbis"];
}
if (isset($_POST['headline']) and trim($_POST['headline']) != '') {
$headline = trim($_POST['headline']);
$_SESSION["umfrageerf_value_headline"] = $headline;
} else {
if ($_SESSION["umfrageerf_value_headline"] == '') {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
}
$headline = $_SESSION["umfrageerf_value_headline"];
}
if(!isset($_GET['erfassen'])){
if (isset($_POST['freitext']) and trim($_POST['freitext']) != '') {
$freitext = '1';
$_SESSION["umfrageerf_value_freitext"] = $freitext;
}else{
$freitext = '0';
$_SESSION["umfrageerf_value_freitext"] = $freitext;
}
}else{
$freitext = $_SESSION["umfrageerf_value_freitext"];
}
$datumvon_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $datumvon);
$datumbis_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $datumbis);
$datum_von = $datumvon_form . " " . $zeitvon . ":00";
$datum_bis = $datumbis_form . " " . $zeitbis . ":00";
function validateDate($date, $format = 'Y-m-d')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
if (!validateDate($datumvon_form)) {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=2\">";
exit;
}
if (!validateDate($datumbis_form)) {
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=2\">";
exit;
}
if(!isset($_GET['erfassen'])){
if ($umid == '') {
$datum = date("Y-m-d H:i:s");
$sql1 = $db->query("INSERT INTO jumi_umfragen ( datum_von
, datum_bis
, headline
, uid
, datum_erfasst
, freitext
)
VALUES
( '$datum_von'
, '$datum_bis'
, '$headline'
, '$uid'
, '$datum'
, '$freitext'
)
");
$umid = $db->insert_id;
$_SESSION["umfrageerf_umid"] = $umid;
}else{
$update = $db->query("UPDATE jumi_umfragen
SET datum_von ='$datum_von'
,datum_bis ='$datum_bis'
,headline = '$headline'
,freitext = '$freitext'
WHERE umid = $umid
");
}
}
if (isset($_GET['tabufid']) and $_GET['tabufid'] != '') {
if ($_GET['tabufid'] == "neuefrage") {
$_SESSION["umfrageerf_ufid"] = "";
} else {
$_SESSION["umfrageerf_ufid"] = $_GET['tabufid'];
}
}
$ufid = $_SESSION["umfrageerf_ufid"];
if ($ufid != '') {
$result_frage = $db->query("SELECT frage, multiple
FROM jumi_umfragen_fragen
WHERE ufid = $ufid");
$row_frage = $result_frage->fetch_array();
$smarty->assign('umfrageerf_value_frage', htmlspecialchars($row_frage['frage']));
$smarty->assign('umfrageerf_value_multiple', $row_frage['multiple']);
$smarty->assign('umfrageerf_value_ufid', $ufid);
}
# Gespeicherte Werte
if ($umid != '') {
$query1 = "SELECT ufid, frage
FROM jumi_umfragen_fragen
WHERE umid=$umid
ORDER BY ufid ASC";
$result1 = $db->query($query1) or die("Cannot execute query1a");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
}
$smarty->assign('table_data1', $table_data1);
if ($ufid != '') {
$smarty->assign('umfrageerf_gesp_werte_value_ufid2', "$ufid");
$query2 = "SELECT uaid, antwort
FROM jumi_umfragen_antworten
WHERE ufid=$ufid
ORDER BY userorder ASC, uaid ASC";
$result2 = $db->query($query2) or die("Cannot execute query2");
$anzahl = $result2->num_rows;
$smarty->assign('table_data2_anz', $anzahl);
while ($row2 = $result2->fetch_array()) {
$table_data2[] = $row2;
}
$smarty->assign('table_data2', $table_data2);
}
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -1,25 +1,24 @@
<?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";
$row10['originalname'] = "Einwilligungserklaerung_personenbezogene_Daten.pdf";
$dateiarray = explode(".",$row10['originalname']);
$endung = ".".$dateiarray[count($dateiarray)-1];
$datei_short = substr($row10['originalname'],0,8)."[...]".$endung;
echo $datei_short;
#$smarty->assign('action', "$action");
#$smarty->display("modern/dashboard/$templatename");
?>
<?php
error_reporting(E_ALL);
$mbox = imap_open("{imap.ionos.de:993/imap/ssl}", "info@ju-and-mi.de", "!S3ge1gP", OP_HALFOPEN)
or die("can't connect: " . imap_last_error());
if($mbox){
echo "connect";
}else{
echo "fail";
}
$list = imap_getmailboxes($mbox, "{imap.ionos.de:993/imap/ssl}", "*");
if (is_array($list)) {
foreach ($list as $key => $val) {
echo "($key) ";
echo imap_utf7_decode($val->name) . ",";
echo "'" . $val->delimiter . "',";
echo $val->attributes . "<br />\n";
}
} else {
echo "imap_getmailboxes failed: " . imap_last_error() . "\n";
}
imap_close($mbox);
?>

View File

@ -1,64 +1,64 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$rid = $_GET['edit'];
$smarty->assign('rollen_edit', $rid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_admin_rolle WHERE rid=$rid");
$row_head = $result_head->fetch_array();
$smarty->assign('rollenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene User
$query = "SELECT uid, vorname, nachname
FROM jumi_admin
WHERE uid NOT IN (SELECT uid FROM jumi_admin_rollen_user_zuord WHERE rid=$rid)
ORDER BY nachname ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT uid, vorname, nachname
FROM jumi_admin
WHERE uid IN (SELECT uid FROM jumi_admin_rollen_user_zuord WHERE rid=$rid)
ORDER BY nachname ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$rid = $_GET['edit'];
$smarty->assign('rollen_edit', $rid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_admin_rolle WHERE rid=$rid");
$row_head = $result_head->fetch_array();
$smarty->assign('rollenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene User
$query = "SELECT uid, vorname, nachname
FROM jumi_admin
WHERE uid NOT IN (SELECT uid FROM jumi_admin_rollen_user_zuord WHERE rid=$rid)
ORDER BY nachname ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT uid, vorname, nachname
FROM jumi_admin
WHERE uid IN (SELECT uid FROM jumi_admin_rollen_user_zuord WHERE rid=$rid)
ORDER BY nachname ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>