This commit is contained in:
2026-02-17 14:56:23 +01:00
commit 68f7a95fdf
695 changed files with 154611 additions and 0 deletions

View File

@@ -0,0 +1,141 @@
<?
$messages = array();
$error = FALSE;
if (isset($custom_action)) {
$action = $custom_action;
} else {
$action = $_REQUEST["action"];
}
switch ($action) {
case 'edit_stufeform':
edit_stufeform();
break;
case 'delete_stufeform':
delete_stufeform();
break;
case 'new_stufeform':
require_once("edit_stufeform_cardform.inc.php");
break;
case 'save_stufeform':
save_stufeform();
break;
case 'moveup_line_stufeform':
moveup_line_stufeform();
require_once("edit_stufe_listform.inc.php");
break;
case 'movedown_line_stufeform':
movedown_line_stufeform();
require_once("edit_stufe_listform.inc.php");
break;
default:
require_once("edit_stufe_listform.inc.php");
break;
}
function save_stufeform() {
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$input_id = "";
if ($_REQUEST["input_id"] <> '') {
$query = "UPDATE stufe SET
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
short_text = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_short_text"]) . "',
modified_date = " . time() . ",
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . "
WHERE id = '" . $_REQUEST["input_id"] . "'
LIMIT 1";
$inserted = FALSE;
$input_id = $_REQUEST["input_id"];
} else {
$query = "INSERT INTO stufe
(main_language_id, description, modified_date, modified_user, short_text)
VALUES (
" . (int)$GLOBALS["language"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_description']) . "',
" . time() . ",
" . (int)$GLOBALS["admin_user"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_short_text']) . "'
)";
$inserted = TRUE;
}
if (($_REQUEST["input_description"] == '')) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
$error = TRUE;
}
if (!$error) {
@mysqli_query($GLOBALS['mysql_con'], $query);
if ($inserted == TRUE) {
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
$messages[] = '<div class="successbox">' . $translation->get("stufeform_msg_success1") . '</div>';
} else {
$messages[] = '<div class="successbox">' . $translation->get("stufeform_msg_success2") . '</div>';
}
edit_stufeform($input_id, $messages);
} else {
header('EDIT_ERROR: 1');
$input_stufeform["description"] = $_REQUEST["input_description"];
$input_stufeform["short_text"] = $_REQUEST["input_short_text"];
$input_stufeform["id"] = $_REQUEST["input_id"];
require_once("edit_stufeform_cardform.inc.php");
}
}
function edit_stufeform( $_id = "", $messages = array() ) {
$input_id = '';
if ((int)$_id > 0) {
$input_id = $_id;
} if(isset($_REQUEST['input_id']) && $_id == ''){
$input_id = $_REQUEST["input_id"];
}
if ($input_id <> '') {
$query = "SELECT * FROM stufe WHERE id = '" . $input_id . "' LIMIT 1";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 1) {
$input_stufeform = @mysqli_fetch_array($result);
require_once("edit_stufeform_cardform.inc.php");
}
} else {
$input_stufeform = array();
require_once("edit_stufeform_cardform.inc.php");
}
}
function delete_stufeform() {
if ($_REQUEST["input_id"] <> '') {
$query = "DELETE FROM stufe WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
require_once("edit_stufe_listform.inc.php");
}
?>

View File

@@ -0,0 +1,35 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "form_stufe_list";
$inputname = "input_id";
?>
<ul class="toolbar_menu">
<?= button("new", $translation->get("new"), $formname, "loadCard('new_stufeform', true)"); ?>
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_stufeform')"); ?>
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_stufeform', false, '{$translation->get('delete_stufeform_confirm')}')"); ?>
</ul>
<div id="mainContent">
<?php echo current_website_language($site, $language); ?>
<h1><?php echo get_translation('left_stufe'); ?></h1>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
<div class="requestLoader"></div>
<?
$query = "SELECT stufe.id, description AS '" . $translation->get("description") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from stufe left join main_admin_user ON stufe.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY sorting asc";
$format = array('option', 'text', 'text', 'text');
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
linklist($result, $formname, $format, "input_id", "edit_stufeform", FALSE, 'update_sortorder_stufe', "sendRequest('delete_stufeform', false, '{$translation->get('delete_stufeform_confirm')}')");
}
?>
</form>
</div>

View File

@@ -0,0 +1,102 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "bewerber_forms";
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
$is_survey = 0;
if(isset($_GET["level_2"]) && $_GET["level_2"] == 'survey_forms'){
$is_survey = 1;
}
$query = 'SELECT * FROM google_recaptcha';
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
$grecaptcha = @mysqli_fetch_array($result);
$reCaptchaDisabled = false;
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
$reCaptchaDisabled = true;
}
?>
<div id="overlaycrumb">
<?php if ($input_stufeform["id"] == "") {
echo $translation->get("new_stufeform");
} else {
echo $translation->get("edit_stufeform");
}
?>
<div id="closeoverlay" onclick="disableOverlay();"></div>
</div>
<ul class="toolbar_menu">
<?php
// Speichern button
button("save", $translation->get("save"), $formname, "loadCard('save_stufeform', true)");
// Speichern und schliessen
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_stufeform', true, '', true)");
?>
<li>
<ul>
<?php
// Loeschen button
if ($input_stufeform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_stufeform', true, '{$translation->get('delete_stufeform_confirm')}', true)", "", FALSE);
}
// Zuruecksetzen
button("reset", $translation->get("restore"), $formname, "?action=edit", "", FALSE);
?>
</ul>
</li>
</ul>
<div class="clearfix"></div>
<?php
if (count($messages)) {
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
}
?>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input name="input_id" type="hidden" value="<?= $input_stufeform["id"] ?>">
<input type="hidden" name="get_real_page_link_id" value="1" />
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? input($translation->get("description"), "input_description", "text", $input_stufeform["description"], 255) ?>
<? input($translation->get("short_text"), "input_short_text", "smalltextarea", $input_stufeform["short_text"], 255) ?>
</td>
</tr>
<tr>
<td>
<?php
if ($input_stufeform["id"] != "") {
show_changed_on($input_stufeform["id"], "stufe");
show_changed_by($input_stufeform["id"], "stufe");
}
?>
</td>
</tr>
</table>
</form>
<br />
<?
?>

View File

@@ -0,0 +1,218 @@
<?
$messages = array();
$error = FALSE;
if (isset($custom_action)) {
$action = $custom_action;
} else {
$action = $_REQUEST["action"];
}
switch ($action) {
case 'edit_processform':
edit_processform();
break;
case 'delete_processform':
delete_processform();
break;
case 'new_processform':
require_once("edit_processform_cardform.inc.php");
break;
case 'save_processform':
save_processform();
break;
case 'moveup_line_processform':
moveup_line_processform();
require_once("edit_process_listform.inc.php");
break;
case 'movedown_line_processform':
movedown_line_processform();
require_once("edit_process_listform.inc.php");
break;
default:
require_once("edit_process_listform.inc.php");
break;
}
function save_processform() {
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$input_id = "";
if ($_REQUEST["input_id"] <> '') {
$query = "UPDATE bewerber_process SET
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
short_text = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_short_text"]) . "',
modified_date = " . time() . ",
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . ",
code = '". mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_code"])."'
WHERE id = '" . $_REQUEST["input_id"] . "'
LIMIT 1";
$inserted = FALSE;
$input_id = $_REQUEST["input_id"];
} else {
$query = "INSERT INTO bewerber_process
(main_language_id, description, modified_date, modified_user, short_text, code)
VALUES (
" . (int)$GLOBALS["language"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_description']) . "',
" . time() . ",
" . (int)$GLOBALS["admin_user"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_short_text']) . "',
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_code']) . "'
)";
$inserted = TRUE;
}
if (($_REQUEST["input_description"] == '')) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
$error = TRUE;
}
if ($_REQUEST["input_code"] <> urlencode($_REQUEST["input_code"])) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_textkey_encoding") . "</div>\n";
$error = TRUE;
}
if (!$error) {
@mysqli_query($GLOBALS['mysql_con'], $query);
if ($inserted == TRUE) {
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
$messages[] = '<div class="successbox">' . $translation->get("processform_msg_success1") . '</div>';
} else {
$messages[] = '<div class="successbox">' . $translation->get("processform_msg_success2") . '</div>';
}
$stufe = array();
$stufe_ids = $_POST['select_stufe'];
if($stufe_ids != NULL && isset($_POST['select_stufe'])){
$stufe = explode(',', $stufe_ids);
}
if(!empty($stufe) && gettype($stufe) == 'array') {
$deleteOld = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM bewerber_process_stufe WHERE process_id='".$input_id."'");
foreach($stufe as $key => $val){
$query = "INSERT INTO bewerber_process_stufe
(stufe_id, process_id)
VALUES (
" . $val . ",
'" . $input_id . "'
)";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
}
edit_processform($input_id, $messages);
} else {
header('EDIT_ERROR: 1');
$input_processform["description"] = $_REQUEST["input_description"];
$input_processform["short_text"] = $_REQUEST["input_short_text"];
$input_processform["id"] = $_REQUEST["input_id"];
require_once("edit_processform_cardform.inc.php");
}
}
function edit_processform( $_id = "", $messages = array() ) {
$input_id = '';
if ((int)$_id > 0) {
$input_id = $_id;
} if(isset($_REQUEST['input_id']) && $_id == ''){
$input_id = $_REQUEST["input_id"];
}
if ($input_id <> '') {
$query = "SELECT * FROM bewerber_process WHERE id = '" . $input_id . "' LIMIT 1";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 1) {
$input_processform = @mysqli_fetch_array($result);
require_once("edit_processform_cardform.inc.php");
}
} else {
$input_processform = array();
require_once("edit_processform_cardform.inc.php");
}
}
function delete_processform() {
if ($_REQUEST["input_id"] <> '') {
$query = "DELETE FROM bewerber_process WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
require_once("edit_process_listform.inc.php");
}
function create_stufe_set($process_id){
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$query = "SELECT * FROM stufe WHERE main_language_id = '" . $GLOBALS["language"]['id'] . "'";
$result = mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 0) {
return;
}
$preselect = array();
$query2 = "SELECT * FROM bewerber_process_stufe WHERE process_id = '" . $process_id . "'";
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
while($row2 = @mysqli_fetch_array($result2)){
array_push($preselect,$row2['stufe_id']);
}
?>
<div class="label"><?php echo $translation->get("select_stufe"); ?></div>
<div class="groups bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
<input type="hidden" name="select_stufe">
<i class="dropdown icon"></i>
<div class="default text"><?php echo $translation->get("select_stufe"); ?></div>
<div class="menu">
<?
while($row = @mysqli_fetch_array($result)) {
echo "<div class=\"item\" data-value=\"{$row['id']}\">".$row["description"]."</div>";
}
?>
</div>
</div>
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
<script>
var $y = jQuery.noConflict();
$y( document ).ready(function() {
$y('.groups.ui.fluid.multiple.dropdown').dropdown('set selected', <?= json_encode($preselect) ?>);
});
</script>
<? }
?>

View File

@@ -0,0 +1,35 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "form_process_list";
$inputname = "input_id";
?>
<ul class="toolbar_menu">
<?= button("new", $translation->get("new"), $formname, "loadCard('new_processform', true)"); ?>
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_processform')"); ?>
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_processform', false, '{$translation->get('delete_processform_confirm')}')"); ?>
</ul>
<div id="mainContent">
<?php echo current_website_language($site, $language); ?>
<h1><?php echo get_translation('left_process'); ?></h1>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
<div class="requestLoader"></div>
<?
$query = "SELECT bewerber_process.id, description AS '" . $translation->get("description") . "', code, from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_process left join main_admin_user ON bewerber_process.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY sorting asc";
$format = array('option', 'text', 'text', 'text');
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
linklist($result, $formname, $format, "input_id", "edit_processform", FALSE, 'update_sortorder_process', "sendRequest('delete_processform', false, '{$translation->get('delete_processform_confirm')}')");
}
?>
</form>
</div>

View File

@@ -0,0 +1,112 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "bewerber_forms";
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
$is_survey = 0;
if(isset($_GET["level_2"]) && $_GET["level_2"] == 'survey_forms'){
$is_survey = 1;
}
$query = 'SELECT * FROM google_recaptcha';
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
$grecaptcha = @mysqli_fetch_array($result);
$reCaptchaDisabled = false;
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
$reCaptchaDisabled = true;
}
?>
<div id="overlaycrumb">
<?php if ($input_processform["id"] == "") {
echo $translation->get("new_processform");
} else {
echo $translation->get("edit_processform");
}
?>
<div id="closeoverlay" onclick="disableOverlay();"></div>
</div>
<ul class="toolbar_menu">
<?php
// Speichern button
button("save", $translation->get("save"), $formname, "loadCard('save_processform', true)");
// Speichern und schliessen
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_processform', true, '', true)");
?>
<li>
<ul>
<?php
// Loeschen button
if ($input_processform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_processform', true, '{$translation->get('delete_processform_confirm')}', true)", "", FALSE);
}
?>
</ul>
</li>
</ul>
<div class="clearfix"></div>
<?php
if (count($messages)) {
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
}
?>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input name="input_id" type="hidden" value="<?= $input_processform["id"] ?>">
<input type="hidden" name="get_real_page_link_id" value="1" />
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? input($translation->get("description"), "input_description", "text", $input_processform["description"], 255) ?>
<? input($translation->get("Code"), "input_code", "text", $input_processform["code"], 255) ?>
<? input($translation->get("short_text"), "input_short_text", "smalltextarea", $input_processform["short_text"], 255) ?>
</td>
<td>
<?php
if ($input_processform["id"] != "") {
show_changed_on($input_processform["id"], "bewerber_process");
show_changed_by($input_processform["id"], "bewerber_process");
}
?>
</td>
</tr>
<tr>
<td>
<?php
if ($input_processform["id"] != "") {
create_stufe_set($input_processform["id"]);
}
?>
</td>
</tr>
</table>
</form>
<br />
<?
?>

View File

@@ -0,0 +1,11 @@
<?
function process_edit() {
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_process.inc.php';
}
?>

11
module/bewerber/stufe.php Normal file
View File

@@ -0,0 +1,11 @@
<?
function stufe_edit() {
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_stufe.inc.php';
}
?>

View File

@@ -0,0 +1,18 @@
<?
function bewerber_edit() {
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_bewerber.inc.php';
}
function bewerbung_edit(){
if(!isset($_REQUEST["action"]) || $_REQUEST["action"] == ''){
$_REQUEST["action"] = 'bewerbung';
}
require __DIR__ . DIRECTORY_SEPARATOR . 'edit_bewerber.inc.php';
}
?>

View File

@@ -0,0 +1,482 @@
<?
$messages = array();
$error = FALSE;
if (isset($custom_action)) {
$action = $custom_action;
} else {
$action = $_REQUEST["action"];
}
switch ($action) {
case 'edit_bewerberform':
edit_bewerberform();
break;
case 'delete_bewerberform':
delete_bewerberform();
break;
case 'save_bewerberform':
save_bewerberform();
break;
case 'save_bewerbungform':
save_bewerbungform();
break;
case 'bewerbung':
require_once("edit_bewerbung_listform.inc.php");
break;
case 'edit_bewerbung':
edit_bewerbung();
break;
case 'loadProcessStufe':
loadProcessStufe();
break;
default:
require_once("edit_bewerber_listform.inc.php");
break;
}
function save_bewerbungform() {
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$input_id = "";
if ($_REQUEST["user_id"] <> '') {
$query = "UPDATE bewerber_user SET
name = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_name"]) . "',
email = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_email"]) . "',
modified_date = " . time() . ",
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . "
WHERE id = '" . $_REQUEST["user_id"] . "'
LIMIT 1";
$inserted = FALSE;
$input_id = $_REQUEST["user_id"];
} else {
$query = "INSERT INTO bewerber_user
(main_language_id, name, modified_date, modified_user, email)
VALUES (
" . (int)$GLOBALS["language"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_name']) . "',
" . time() . ",
" . (int)$GLOBALS["admin_user"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_email']) . "'
)";
$inserted = TRUE;
}
if (($_REQUEST["input_name"] == '')) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_name") . "</div>\n";
$error = TRUE;
}
if (($_REQUEST["input_email"] == '')) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_email") . "</div>\n";
$error = TRUE;
}
if (!$error) {
@mysqli_query($GLOBALS['mysql_con'], $query);
if ($inserted == TRUE) {
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success1") . '</div>';
} else {
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success2") . '</div>';
}
$process = '';
if( isset($_POST['select_process'])){
$process = $_REQUEST['select_process'];
}
if($process != '') {
$queryDel = "DELETE FROM bewerber_user_process WHERE user_id='".$input_id."' AND main_collection_id = '".$_REQUEST['main_collection_id']."'";
$deleteOld = @mysqli_query($GLOBALS["mysql_con"], $queryDel );
$query = "INSERT INTO bewerber_user_process
(user_id, process_id, main_collection_id)
VALUES (
" . $input_id . ",
'" . $process . "',
'".$_REQUEST['main_collection_id']."'
)";
@mysqli_query($GLOBALS['mysql_con'], $query);
$stufe = array();
$stufe_ids = $_POST['select_stufe'];
if($stufe_ids != NULL && isset($_POST['select_stufe'])){
$stufe = explode(',', $stufe_ids);
}
$queryDel = "DELETE FROM bewerbung_process_stufe WHERE bewerbung_id = '".$_REQUEST['input_id']."' AND user_id = '".$input_id."'";
$deleteOldStufe = @mysqli_query($GLOBALS["mysql_con"],$queryDel);
if(!empty($stufe) && gettype($stufe) == 'array') {
foreach($stufe as $key => $val){
$query = "INSERT INTO bewerbung_process_stufe
(bewerbung_id, stufe_id, process_id, user_id)
VALUES (
" . $_REQUEST['input_id'] . ",
" . $val . ",
'" . $process . "',
" . $input_id . "
)";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
}
}
$_REQUEST['action'] = 'save_bewerbungform';
edit_bewerbung($_REQUEST['input_id'], $messages);
} else {
header('EDIT_ERROR: 1');
$input_bewerberform["name"] = $_REQUEST["input_name"];
$input_bewerberform["email"] = $_REQUEST["input_email"];
$input_bewerberform["input_id"] = $_REQUEST["input_id"];
require_once("edit_bewerbung_cardform.inc.php");
}
}
function save_bewerberform() {
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$input_id = "";
if ($_REQUEST["input_id"] <> '') {
$query = "UPDATE bewerber_user SET
name = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_name"]) . "',
email = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_email"]) . "',
modified_date = " . time() . ",
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . "
WHERE id = '" . $_REQUEST["input_id"] . "'
LIMIT 1";
$inserted = FALSE;
$input_id = $_REQUEST["input_id"];
} else {
$query = "INSERT INTO bewerber_user
(main_language_id, name, modified_date, modified_user, email)
VALUES (
" . (int)$GLOBALS["language"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_name']) . "',
" . time() . ",
" . (int)$GLOBALS["admin_user"]['id'] . ",
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_email']) . "'
)";
$inserted = TRUE;
}
if (($_REQUEST["input_name"] == '')) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_name") . "</div>\n";
$error = TRUE;
}
if (($_REQUEST["input_email"] == '')) {
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_email") . "</div>\n";
$error = TRUE;
}
if (!$error) {
@mysqli_query($GLOBALS['mysql_con'], $query);
if ($inserted == TRUE) {
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success1") . '</div>';
} else {
$messages[] = '<div class="successbox">' . $translation->get("user_msg_success2") . '</div>';
}
$process = array();
$process_ids = $_POST['select_process'];
if($process_ids != NULL && isset($_POST['select_process'])){
$process = explode(',', $process_ids);
}
if(!empty($process) && gettype($process) == 'array') {
$deleteOld = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM bewerber_user_process WHERE user_id='".$input_id."'");
foreach($process as $key => $val){
$query = "INSERT INTO bewerber_user_process
(user_id, process_id)
VALUES (
" . $input_id . ",
'" . $val . "'
)";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
}
// notes
$deleteData = @mysqli_query($GLOBALS["mysql_con"], "DELETE FROM bewerber_user_notes WHERE user_id='".$input_id."' ");
print_r($options);
if(isset($_REQUEST['totalOption']) && $_REQUEST['totalOption'] > 0){
$options = $_REQUEST['totalOption'] ;
for($column = 0; $column <= $options; $column++){
if (array_key_exists("input_user_note_" . $input_id."_".$column,$_POST) && $_POST["input_user_note_" . $input_id."_".$column] != "" && $_POST["input_user_note_" . $input_id."_".$column] != NULL) {
$query = "INSERT INTO bewerber_user_notes
(user_id, notes)
VALUES (
" . $input_id . ",
'" . $_POST["input_user_note_" . $input_id."_".$column] . "'
)";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
}
}
// notea end
edit_bewerberform($input_id, $messages);
} else {
header('EDIT_ERROR: 1');
$input_bewerberform["name"] = $_REQUEST["input_name"];
$input_bewerberform["email"] = $_REQUEST["input_email"];
$input_bewerberform["id"] = $_REQUEST["input_id"];
require_once("edit_bewerber_cardform.inc.php");
}
}
function edit_bewerbung( $_id = "", $messages = array() ) {
$input_id = '';
if ((int)$_id > 0) {
$input_id = $_id;
} if((isset($_REQUEST['input_id']) || isset($_REQUEST['data-inputid']) ) && $_id == ''){
$input_id = $_REQUEST["input_id"];
}
if(isset($_REQUEST['data-inputid'])){
$input_id = $_REQUEST["data-inputid"];
}
if ($input_id <> '') {
$query = "SELECT bu.*, bun.id as bunID, bun.main_collection_id, bun.contact_id FROM bewerber_user as bu INNER JOIN bewerbung as bun on bu.id = bun.user_id WHERE bun.id = '" . $input_id . "' LIMIT 1";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 1) {
$input_bewerberform = @mysqli_fetch_array($result);
require_once("edit_bewerbung_cardform.inc.php");
}
} else {
$input_bewerberform = array();
require_once("edit_bewerbung_cardform.inc.php");
}
}
function edit_bewerberform( $_id = "", $messages = array() ) {
$input_id = '';
if ((int)$_id > 0) {
$input_id = $_id;
} if(isset($_REQUEST['input_id']) && $_id == ''){
$input_id = $_REQUEST["input_id"];
}
if(isset($_REQUEST['bewerber_id'])){
$input_id = $_REQUEST['bewerber_id'];
}
if ($input_id <> '') {
$query = "SELECT * FROM bewerber_user WHERE id = '" . $input_id . "' LIMIT 1";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 1) {
$input_bewerberform = @mysqli_fetch_array($result);
require_once("edit_bewerber_cardform.inc.php");
}
} else {
$input_bewerberform = array();
require_once("edit_bewerber_cardform.inc.php");
}
}
function delete_processform() {
if ($_REQUEST["input_id"] <> '') {
$query = "DELETE FROM bewerber_user WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
@mysqli_query($GLOBALS['mysql_con'], $query);
}
require_once("edit_process_listform.inc.php");
}
function create_process_set($user_id, $collection_id){
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$query = "SELECT * FROM bewerber_process WHERE main_language_id = '" . $GLOBALS["language"]['id'] . "'";
$result = mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 0) {
return;
}
$preselect = array();
$query2 = "SELECT * FROM bewerber_user_process WHERE user_id = '" . $user_id . "' AND main_collection_id = ".$collection_id;
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
while($row2 = @mysqli_fetch_array($result2)){
array_push($preselect,$row2['process_id']);
}
echo "<div class=\"label\"><label for=\"" ."select_process" . "\">" . $translation->get("select_process") . "</label></div>";
echo "<div class=\"input\"><select onchange=\"loadProcessStufe(this.value);\" class=\"bigselect\" name=\"" . "select_process" . "\" id=\"" . "select_process" . "\">";
// neue typen die nur fuer kollektionen vorgesehen sind
while($row = @mysqli_fetch_array($result)) {
$selected = '';
if (in_array($row['id'], $preselect)) {
$selected = 'selected="selected"';
}
echo "<option " . $selected . " value=\"" . $row['id'] . "\">" . $row["description"].' - '.$row['code'] . "</option>";
}
echo "</select>";
?>
<? }
function loadProcessStufe(){
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$process_id = $_REQUEST['process_id'];
$query = "SELECT st.* FROM stufe as st INNER JOIN bewerber_process_stufe as bps on st.id = bps.stufe_id WHERE st.main_language_id = '" . $GLOBALS["language"]['id'] . "' AND process_id = ".$process_id ;
$result = mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 0) {
return;
}
?>
<div class="label"><?php echo $translation->get("select_stufe"); ?></div>
<div class="groups bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
<input type="hidden" name="select_stufe">
<i class="dropdown icon"></i>
<div class="default text"><?php echo $translation->get("select_stufe"); ?></div>
<div class="menu">
<?
while($row = @mysqli_fetch_array($result)) {
echo "<div class=\"item\" data-value=\"{$row['id']}\">".$row["description"]."</div>";
}
?>
</div>
</div>
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
<script>
var $y = jQuery.noConflict();
$y( document ).ready(function() {
$y('.groups.ui.fluid.multiple.dropdown').dropdown();
});
</script>
<?
}
function create_stufe_set($bunID){
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$query = "SELECT st.* FROM stufe as st INNER JOIN bewerbung_process_stufe as bps on st.id = bps.stufe_id WHERE main_language_id = '" . $GLOBALS["language"]['id'] . "' AND bewerbung_id = ".$bunID;
$result = mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 0) {
return;
}
$preselect = array();
$query2 = "SELECT * FROM bewerbung_process_stufe WHERE bewerbung_id = '" . $bunID . "'";
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
while($row2 = @mysqli_fetch_array($result2)){
array_push($preselect,$row2['stufe_id']);
}
?>
<div class="label"><?php echo $translation->get("select_stufe"); ?></div>
<div class="groups bc-select-ui ui fluid multiple search selection dropdown" style="clear:both;display:inline-block;">
<input type="hidden" name="select_stufe">
<i class="dropdown icon"></i>
<div class="default text"><?php echo $translation->get("select_stufe"); ?></div>
<div class="menu">
<?
while($row = @mysqli_fetch_array($result)) {
echo "<div class=\"item\" data-value=\"{$row['id']}\">".$row["description"]."</div>";
}
?>
</div>
</div>
<script type="text/javascript" src="/plugins/jquery/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/plugins/Semantic-UI-master/semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="/plugins/Semantic-UI-master/bc-semantic.css?time=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/plugins/Semantic-UI-master/bc-semantic.css')?>">
<script>
var $y = jQuery.noConflict();
$y( document ).ready(function() {
$y('.groups.ui.fluid.multiple.dropdown').dropdown('set selected', <?= json_encode($preselect) ?>);
});
</script>
<? }
function create_notes_set($user_id){
$query = "SELECT * FROM bewerber_user_notes WHERE user_id = ".$user_id;
$result = mysqli_query($GLOBALS['mysql_con'], $query);
$counter = 0;
while($row = @mysqli_fetch_array($result)){
echo '<div class="notes_input input_note_'.$counter.'">';
echo '<textarea name="input_user_note_'.$user_id.'_'.$counter.'"> '.$row['notes'].'</textarea>';
echo '<button type="button" data-counter="'.$counter.'" class="r-btnRemove btnRemove btn btn-danger">Entfernen -</button>';
echo '</div>';
$counter++;
}
echo '<input type="hidden" id="totalOption" name="totalOption" value="'.$counter.'">';
}
?>

View File

@@ -0,0 +1,156 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "bewerber_forms";
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
$is_survey = 0;
$query = 'SELECT * FROM google_recaptcha';
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
$grecaptcha = @mysqli_fetch_array($result);
$reCaptchaDisabled = false;
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
$reCaptchaDisabled = true;
}
?>
<div id="overlaycrumb">
<?php
echo $translation->get("edit_user");
?>
<div id="closeoverlay" onclick="disableOverlay();"></div>
</div>
<ul class="toolbar_menu">
<?php
// Speichern button
button("save", $translation->get("save"), $formname, "loadCard('save_bewerberform', true)");
// Speichern und schliessen
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_bewerberform', true, '', true)");
?>
<li>
<ul>
<?php
// Loeschen button
if ($input_bewerberform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_bewerberform', true, '{$translation->get('delete_user_confirm')}', true)", "", FALSE);
}
?>
</ul>
</li>
</ul>
<div class="clearfix"></div>
<?php
if (count($messages)) {
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
}
?>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input name="input_id" type="hidden" value="<?= $input_bewerberform["id"] ?>">
<input type="hidden" name="get_real_page_link_id" value="1" />
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? input($translation->get("name"), "input_name", "text", $input_bewerberform["name"], 255) ?>
<? input($translation->get("email"), "input_email", "text", $input_bewerberform["email"], 255) ?>
</td>
<td>
<?php
if ($input_bewerberform["id"] != "") {
show_changed_on($input_bewerberform["id"], "bewerber_user");
show_changed_by($input_bewerberform["id"], "bewerber_user");
}
?>
</td>
</tr>
<tr>
<td>
<div class="notes_section">
<button style="position:inherit;" type="button" class="r-btnAdd btnAdd btn btn-primary" data-user="<?=$input_bewerberform["id"];?>">Hinzufügen +</button>
<?php
if ($input_bewerberform["id"] != "") {
create_notes_set($input_bewerberform["id"]);
}
?>
</div>
</td>
</tr>
</table>
</form>
<br />
<?php $formname .= "_listing";
?>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input name="bewerber_id" type="hidden" value="<?= $input_bewerberform['id']; ?>">
<?php
$query = "SELECT bun.id, description as '". $translation->get("description")."', from_unixtime(bun.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_user AS bu left join main_admin_user ON bu.modified_user = main_admin_user.id INNER JOIN bewerbung as bun on bu.id = bun.user_id INNER JOIN main_collection as mc on bun.main_collection_id = mc.id where (bu.id = " . (int)$input_bewerberform['id'] . ") ORDER BY id DESC";
$format = array('option', 'text', 'text');
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
linklist($result, $formname, $format, "input_id", "edit_bewerbung", FALSE, 'update_sortorder_bewerber', "sendRequest('delete_bewerbung', false, '{$translation->get('delete_stufeform_confirm')}')");
}
?>
</form>
<?
?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"></script>
<script type="text/javascript">
$('.btnAdd').click(function(){
var counter = $('#totalOption').val();
var user = $(this).attr('data-user');
counter++;
$('#totalOption').val(counter);
$('.notes_section').append(loadNextModule(counter, user));
});
$('.btnRemove').click(function(){
counter = $(this).attr('data-counter');
$('.input_note_'+ counter).remove();
console.log('counter ist' + counter);
counter--;
$('#totalOption').val(counter);
});
function myFunctionDelete(counter){
$('.input_note_'+ counter).remove();
counter--;
$('#totalOption').val(counter);
}
function loadNextModule(counter, user_id){
var html = '<div class="notes_input input_note_'+counter+'">' +
'<textarea name="input_user_note_'+user_id+'_'+counter+'"> </textarea>'+
'<button type="button" onclick="myFunctionDelete('+counter+')" data-counter="'+counter+'" class="r-btnRemove btnRemove btn btn-danger">Entfernen -</button>'+
'</div>';
return html
}
</script>

View File

@@ -0,0 +1,35 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "form_bewerber_list";
$inputname = "input_id";
?>
<ul class="toolbar_menu">
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_bewerberform')"); ?>
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_bewerberform', false, '{$translation->get('delete_user_confirm')}')"); ?>
</ul>
<div id="mainContent">
<?php echo current_website_language($site, $language); ?>
<h1><?php echo get_translation('bewerber'); ?></h1>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
<div class="requestLoader"></div>
<?
$query = "SELECT bu.id, bu.name AS '" . $translation->get("name") . "', from_unixtime(bu.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_user AS bu left join main_admin_user ON bu.modified_user = main_admin_user.id INNER JOIN contactform_header as ch on bu.contact_form_id = ch.id where (bu.main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY id DESC";
$format = array('option', 'text', 'text', 'text');
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
linklist($result, $formname, $format, "input_id", "edit_bewerberform", FALSE, 'update_sortorder_bewerber', "sendRequest('delete_bewerberform', false, '{$translation->get('delete_user_confirm')}')");
}
?>
</form>
</div>

View File

@@ -0,0 +1,229 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "bewerber_forms";
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
$bewerber_id = (isset($_REQUEST['bewerber_id']) ? $_REQUEST['bewerber_id'] : "");
$is_survey = 0;
$query = 'SELECT * FROM google_recaptcha';
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
$grecaptcha = @mysqli_fetch_array($result);
$reCaptchaDisabled = false;
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
$reCaptchaDisabled = true;
}
?>
<div id="overlaycrumb">
<?php
echo $translation->get("edit_bewerbung");
?>
<div id="closeoverlay" onclick="disableOverlay();"></div>
</div>
<ul class="toolbar_menu">
<?php
// Speichern button
button("save", $translation->get("save"), $formname, "loadCard('save_bewerbungform', true)");
// Speichern und schliessen
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_bewerbungform', true, '', true)");
if($bewerber_id != ''){
button("left", $translation->get("back"), $formname, "loadCard('edit_bewerberform', true)");
}
?>
<li>
<ul>
<?php
// Loeschen button
if ($input_bewerberform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_bewerbungform', true, '{$translation->get('delete_stufeform_confirm')}', true)", "", FALSE);
}
?>
</ul>
</li>
</ul>
<div class="clearfix"></div>
<?php
if (count($messages)) {
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
}
?>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input name="input_id" type="hidden" value="<?= $input_bewerberform["bunID"] ?>">
<input name="user_id" type="hidden" value="<?= $input_bewerberform["id"] ?>">
<input name="bewerber_id" type="hidden" value="<?= $bewerber_id ?>">
<input name="contact_id" type="hidden" value="<?= $input_bewerberform["contact_id"] ?>">
<input name="main_collection_id" type="hidden" value="<?= $input_bewerberform["main_collection_id"] ?>">
<input type="hidden" name="get_real_page_link_id" value="1" />
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? input($translation->get("name"), "input_name", "text", $input_bewerberform["name"], 255) ?>
<? input($translation->get("email"), "input_email", "text", $input_bewerberform["email"], 255) ?>
</td>
<td>
<?php
if ($input_bewerberform["id"] != "") {
show_changed_on($input_bewerberform["bunId"], "bewerbung");
show_changed_by($input_bewerberform["bunID"], "bewerbung");
}
?>
</td>
</tr>
<tr>
<td>
<?php
if ($input_bewerberform["id"] != "") {
$query = "SELECT * FROM main_collection WHERE id = ".$input_bewerberform["main_collection_id"];
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
$collection = @mysqli_fetch_array($result);
input($translation->get("job_applied"), "main_collection", "text", $collection["description"], 255, TRUE) ;
}
?>
</td>
<td>
<?php
if ($input_bewerberform["id"] != "") {
create_process_set($input_bewerberform["id"], $input_bewerberform["main_collection_id"]);
}
?>
</td>
</tr>
<?php if ($input_bewerberform["id"] != "") { ?>
<tr>
<td>
<img class="loader" style="display:none;" src="/layout/admin/img/icons/ajax-loader.gif" />
<div class="process_stufe">
<?php
if ($input_bewerberform["id"] != "") {
create_stufe_set($input_bewerberform["bunID"]);
}
?>
</div>
</td>
</tr>
<?php } ?>
<tr>
<td colspan="2">
<hr>
<h2><?php echo $translation->get("top_userdata");; ?></h2>
</td>
</tr>
<tr>
<?php
$query = "SELECT cl.* FROM contactform_line as cl INNER JOIN contactform_header as ch on cl.header_id = ch.id WHERE header_id = '" . $input_bewerberform["contact_id"] . "' AND code != 'registration_name' AND code != 'registration_email' AND is_registration = 1 ORDER BY sorting ASC";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) > 0) {
while ($field = @mysqli_fetch_array($result)) {
$queryLink = "SELECT bucl.* FROM contactform_line as cl INNER JOIN bewerber_user_contact_link as bucl on cl.id = bucl.line_id WHERE header_id = '" . $input_bewerberform["contact_id"] . "' AND line_id = ".$field['id']." AND user_id = ". $input_bewerberform["id"]." ORDER BY sorting ASC";
$resultLink = @mysqli_query($GLOBALS['mysql_con'], $queryLink);
$row = @mysqli_fetch_array($resultLink);
echo '<td>';
input($field['name'], $field["code"], "text", $row["content"], 255, TRUE) ;
echo '</td>';
}
}
?>
</tr>
</table>
</form>
<br />
<?
?>
<script type="text/javascript">
function loadProcessStufe( process_id ) {
$('.process_stufe', $('#<?php echo $formname; ?>')).html("");
if (process_id == "" || process_id == 0) {
return;
}
$('.loader', $('#<?php echo $formname ?>')).show();
// ajax
var formData = new FormData(jQuery('#<?php echo $formname; ?>' )[0]);
formData.append("process_id", process_id);
$.ajax({
url : "?action=loadProcessStufe",
type : 'POST',
data : formData,
cache : false,
processData: false, // Don't process the files
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
// dataType : 'html',
success : function ( output, status, xhr ) {
console.log('log ist' + xhr.getResponseHeader('REQUIRES_AUTH'));
if (xhr.getResponseHeader('REQUIRES_AUTH') == 1) {
window.location.replace("/mysyde/");
} else {
$('.loader').hide();
$('.process_stufe' ).html(output);
}
},
error: function (jqXHR, exception) {
var msg = '';
if (jqXHR.status === 0) {
msg = 'Not connect.\n Verify Network.';
} else if (jqXHR.status == 404) {
msg = 'Requested page not found. [404]';
} else if (jqXHR.status == 500) {
msg = 'Internal Server Error [500].';
} else if (exception === 'parsererror') {
msg = 'Requested JSON parse failed.';
} else if (exception === 'timeout') {
msg = 'Time out error.';
} else if (exception === 'abort') {
msg = 'Ajax request aborted.';
} else {
msg = 'Uncaught Error.\n' + jqXHR.responseText;
}
console.log(msg);
}
});
}
</script>

View File

@@ -0,0 +1,35 @@
<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname = "form_bewerber_list";
$inputname = "input_id";
?>
<ul class="toolbar_menu">
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_bewerbung')"); ?>
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_bewerbung', false, '{$translation->get('delete_stufeform_confirm')}')"); ?>
</ul>
<div id="mainContent">
<?php echo current_website_language($site, $language); ?>
<h1><?php echo get_translation('left_bewerbung'); ?></h1>
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
<div class="requestLoader"></div>
<?
$query = "SELECT bun.id, bu.name AS '" . $translation->get("name") . "', description as '". $translation->get("description")."', from_unixtime(bun.modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from bewerber_user AS bu left join main_admin_user ON bu.modified_user = main_admin_user.id INNER JOIN bewerbung as bun on bu.id = bun.user_id INNER JOIN main_collection as mc on bun.main_collection_id = mc.id where (bu.main_language_id = " . (int)$GLOBALS["language"]['id'] . ") ORDER BY id DESC";
$format = array('option', 'text', 'text', 'text');
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
linklist($result, $formname, $format, "input_id", "edit_bewerbung", FALSE, 'update_sortorder_bewerber', "sendRequest('delete_bewerbung', false, '{$translation->get('delete_stufeform_confirm')}')");
}
?>
</form>
</div>