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,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';
}
?>