first commit
This commit is contained in:
56
admin/save_hs.php
Executable file
56
admin/save_hs.php
Executable file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if(!isset($_SESSION)) { session_start(); }
|
||||
|
||||
require_once("../config/datenbankanbindung.php");
|
||||
|
||||
|
||||
$resp_hs = $_POST['get_resp_hs'];
|
||||
$art = $_POST['get_art'];
|
||||
$ka_id = $_POST['get_ka_id'];
|
||||
|
||||
$db = dbconnect();
|
||||
if($art == 'R'){
|
||||
#zust<73>ndige Hochschule
|
||||
$sql1 = $db->query("UPDATE bpm_kandidat
|
||||
SET hochschule = '$resp_hs'
|
||||
WHERE ka_id = '$ka_id'");
|
||||
}
|
||||
|
||||
if($art == 'W'){
|
||||
#Wunsch Hochschule
|
||||
$result_countid = $db->query("SELECT count(*) Anz
|
||||
FROM bpm_erw_daten
|
||||
WHERE ka_id = '$ka_id'");
|
||||
$row_countid = $result_countid->fetch_array();
|
||||
if($resp_hs != ''){
|
||||
if($row_countid['Anz'] == 0){
|
||||
$sql1 = $db->query("INSERT INTO bpm_erw_daten (ka_id, wunsch_hs) VALUES ($ka_id, '$resp_hs')");
|
||||
}else{
|
||||
$sql1 = $db->query("UPDATE bpm_erw_daten
|
||||
SET wunsch_hs = '$resp_hs'
|
||||
WHERE ka_id = '$ka_id'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($art == 'Z'){
|
||||
#zugewiesene Hochschule
|
||||
$result_countid = $db->query("SELECT count(*) Anz
|
||||
FROM bpm_erw_daten
|
||||
WHERE ka_id = '$ka_id'");
|
||||
$row_countid = $result_countid->fetch_array();
|
||||
if($resp_hs != ''){
|
||||
if($row_countid['Anz'] == 0){
|
||||
$sql1 = $db->query("INSERT INTO bpm_erw_daten (ka_id, zugewiesene_hs) VALUES ($ka_id, '$resp_hs')");
|
||||
}else{
|
||||
$sql1 = $db->query("UPDATE bpm_erw_daten
|
||||
SET zugewiesene_hs = '$resp_hs'
|
||||
WHERE ka_id = '$ka_id'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user