1. Import
This commit is contained in:
122
html/tools/jb_hq_set.php
Normal file
122
html/tools/jb_hq_set.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
include_once ("../include/mcglobal.inc.php");
|
||||
include_once ("../include/auth.inc.php");
|
||||
include_once ("../include/html.inc.php");
|
||||
|
||||
|
||||
// Check HTTP-Parameters
|
||||
getSecHttpVars("1",array("f_act", "jbId", "jbHqId", "jbHqIdDispo", "jbHqIdExec", "jbHqIdSales"));
|
||||
|
||||
// Init
|
||||
$pageTitel = "AUFTRAGS-ROLLEN SETZEN";
|
||||
|
||||
|
||||
$hqArr = getColVectorFromDB2ArrayByClause("headquarters", "hq_mnemonic", "", "hq_id", "hq_mnemonic", "");
|
||||
// Add zero element
|
||||
$hqArr[0] = "KEINE";
|
||||
|
||||
|
||||
// Store hq ids
|
||||
if ($f_act == "set") :
|
||||
if ($jbId != "" && is_numeric($jbId) && $jbId > 0) :
|
||||
if ($jbHqId != "" && is_numeric($jbHqId)) :
|
||||
updateStmt("job","jb_id",$jbId,array("hq_id", $jbHqId));
|
||||
endif;
|
||||
if ($jbHqIdDispo != "" && is_numeric($jbHqIdDispo)) :
|
||||
updateStmt("job","jb_id",$jbId,array("hq_id_dispo", $jbHqIdDispo));
|
||||
endif;
|
||||
if ($jbHqIdExec != "" && is_numeric($jbHqIdExec)) :
|
||||
updateStmt("job","jb_id",$jbId,array("hq_id_exec", $jbHqIdExec));
|
||||
endif;
|
||||
if ($jbHqIdSales != "" && is_numeric($jbHqIdSales)) :
|
||||
updateStmt("job","jb_id",$jbId,array("hq_id_sales", $jbHqIdSales));
|
||||
endif;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
// Get current data
|
||||
if ($jbId != "") :
|
||||
$jbHqId = getFieldValueFromId("job", "jb_id", $jbId, "hq_id");
|
||||
$jbHqIdDispo = getFieldValueFromId("job", "jb_id", $jbId, "hq_id_dispo");
|
||||
$jbHqIdExec = getFieldValueFromId("job", "jb_id", $jbId, "hq_id_exec");
|
||||
$jbHqIdSales = getFieldValueFromId("job", "jb_id", $jbId, "hq_id_sales");
|
||||
endif;
|
||||
|
||||
// echo "Erf.: " . $hqArr[$jbHqId] . " " . "Dsp = " . $hqArr[$jbHqIdDispo] . " " . "Aus = " . $hqArr[$jbHqIdExec] . " " . "Kds = " . $hqArr[$jbHqIdSales];
|
||||
?>
|
||||
|
||||
<?php if (true) : ?>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?php echo $pageTitel ?></title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
|
||||
<style type="text/css">
|
||||
<?php include_once ("../css/navigation.css.php"); ?>
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function finishPage(f_act) {
|
||||
var doContinue = true;
|
||||
/*
|
||||
if (f_act == 'newValues' && !confirm('<?php echo "Neue Aufgaben generieren?" ?>')) {
|
||||
doContinue = false;
|
||||
}
|
||||
*/
|
||||
if (doContinue) {
|
||||
document.forms[0].f_act.value = f_act;
|
||||
document.forms[0].submit();
|
||||
}
|
||||
};
|
||||
-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="maincontent" name="maincontent" id="maincontent">
|
||||
|
||||
<form name="history" action="../tools/jb_hq_set.php" method="post">
|
||||
|
||||
<input type="hidden" name="f_act" value="">
|
||||
|
||||
<br>
|
||||
<div>
|
||||
<table cellspacing="3" cellpadding="3" vspace="3" hspace="3">
|
||||
<?php // echo $out ?>
|
||||
<tr>
|
||||
<td>Auftrag:</td>
|
||||
<td><input type="text" name="jbId" value="<?php echo $jbId ?>" size="10"> <input type="button" name="job" value="Aktualisieren" onClick="finishPage('job');"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Erfassende NL:</td>
|
||||
<td><select name="jbHqId">"<?php echo addOptionsFromAssociativeArray($hqArr, $jbHqId); ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zuweisende NL:</td>
|
||||
<td><select name="jbHqIdDispo">"<?php echo addOptionsFromAssociativeArray($hqArr, $jbHqIdDispo); ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ausführende NL:</td>
|
||||
<td><select name="jbHqIdExec">"<?php echo addOptionsFromAssociativeArray($hqArr, $jbHqIdExec); ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kundenbetreuende NL:</td>
|
||||
<td><select name="jbHqIdSales">"<?php echo addOptionsFromAssociativeArray($hqArr, $jbHqIdSales); ?></select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><input type="button" name="store" value="Speichern" onClick="finishPage('set');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user