first commit
This commit is contained in:
80
func_beteiligter_status.php
Executable file
80
func_beteiligter_status.php
Executable file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
class beteiligter {
|
||||
|
||||
function beteiligter_status($bid){
|
||||
global $db;
|
||||
|
||||
$result_bet_data = $db->query("SELECT bid, frist_datum, date_format(stellung_dat, '%d.%m.%Y (%H:%i)') stellung_dat_form, stellung_dat
|
||||
FROM imt_beteiligte
|
||||
WHERE bid='$bid'
|
||||
");
|
||||
$row_bet_data = $result_bet_data->fetch_array();
|
||||
|
||||
# Frist abgelaufen, Stellungnahme vom
|
||||
# Frist abgelaufen, keine Stellungnahme abgegeben
|
||||
# Erfassung noch möglich, Stellungnahme vom
|
||||
# Erfassung noch möglich, noch keine Stellungnahme
|
||||
|
||||
if($row_bet_data[stellung_dat] != '0000-00-00 00:00:00'){
|
||||
$status = ": Stellungnahme vom $row_bet_data[stellung_dat_form]";
|
||||
}else{
|
||||
$status = "";
|
||||
}
|
||||
$aend_dat = date("Y-m-d");
|
||||
|
||||
if($row_bet_data[frist_datum] >= $aend_dat AND $row_bet_data[stellung_dat] != '0000-00-00 00:00:00'){
|
||||
return 1;
|
||||
}
|
||||
|
||||
if($row_bet_data[frist_datum] >= $aend_dat AND $row_bet_data[stellung_dat] == '0000-00-00 00:00:00'){
|
||||
return 2;
|
||||
}
|
||||
|
||||
if($row_bet_data[frist_datum] < $aend_dat AND $row_bet_data[stellung_dat] != '0000-00-00 00:00:00'){
|
||||
return 3;
|
||||
}
|
||||
|
||||
if($row_bet_data[frist_datum] < $aend_dat AND $row_bet_data[stellung_dat] == '0000-00-00 00:00:00'){
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function beteiligter_status_klartext($bid, $status){
|
||||
global $db;
|
||||
|
||||
if($status == 1){
|
||||
$result_bet_data = $db->query("SELECT bid, frist_datum, date_format(stellung_dat, '%d.%m.%Y (%H:%i)') stellung_dat_form, stellung_dat
|
||||
FROM imt_beteiligte
|
||||
WHERE bid='$bid'
|
||||
");
|
||||
$row_bet_data = $result_bet_data->fetch_array();
|
||||
|
||||
return "Erfassung noch möglich, <a class='aformlink box' title='Stellungnahme Beteiligter' href='ansicht_stellungnahme.php?bid=$bid'>Stellungnahme vom $row_bet_data[stellung_dat_form]</a>";
|
||||
}
|
||||
|
||||
if($status == 2){
|
||||
return "Erfassung noch möglich, keine Stellungnahme abgegeben";
|
||||
}
|
||||
|
||||
if($status == 3){
|
||||
$result_bet_data = $db->query("SELECT bid, frist_datum, date_format(stellung_dat, '%d.%m.%Y (%H:%i)') stellung_dat_form, stellung_dat
|
||||
FROM imt_beteiligte
|
||||
WHERE bid='$bid'
|
||||
");
|
||||
$row_bet_data = $result_bet_data->fetch_array();
|
||||
|
||||
return "Frist abgelaufen, <a class='aformlink box' title='Stellungnahme Beteiligter' href='ansicht_stellungnahme.php?bid=$bid'>Stellungnahme vom $row_bet_data[stellung_dat_form]</a>";
|
||||
}
|
||||
|
||||
if($status == 4){
|
||||
return "Frist abgelaufen, keine Stellungnahme abgegeben";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user