1. Import

This commit is contained in:
2026-03-29 10:34:57 +02:00
parent b0e00c1259
commit a1129565af
4899 changed files with 3007593 additions and 0 deletions

View File

@@ -0,0 +1,150 @@
<?php
/*=======================================================================
*
* cr_changepwd.php
*
* Autor: Marc Vollmann
*
=======================================================================*/
include_once ("../include/mcglobal.inc.php");
include_once ("../include/auth.inc.php");
// Check HTTP-Parameters
getSecHttpVars("1",array("f_act", "f_currentPassword", "f_newPassword", "f_newPassword2", "statusMessage"));
$pageTitel = "PASSWORTÄNDERUNG";
include_once ("../admin/menu.php");
include_once ("../include/html.inc.php");
// Check for authentication access and granted rights
$usrAccessArray["cr"] = "1";
authCheckForAccess($hq_id, $usr_id, $emp_id, "1", $customerId, $cscIdRoot, $cscIdActual);
if ($f_act == "setPassword") :
if (checkPasswordValidation($f_newPassword,$f_newPassword2)) :
// Current password
$currPwd = getFieldValueFromId("user","usr_id",$usr_id,"usr_password");
// Update password ONLY if old password matches
$sqlStmt = "UPDATE user SET usr_password = PASSWORD('$f_newPassword') WHERE usr_id = '$usr_id' AND usr_type = '$userType' AND usr_password = PASSWORD('$f_currentPassword')";
$res = $db->query($sqlStmt);
if (DB::isError($res)) die ("$PHP_SELF: <br>$sqlStmt<br>" . $res->getMessage());
$newPwd = getFieldValueFromId("user","usr_id",$usr_id,"usr_password");
if ($currPwd != $newPwd) :
$statusMessage = "Ihr Passwort wurde geändert!";
else :
$statusMessage = "Ihr Passwort konnte nicht geändert werden! Versuchen Sie es bitte erneut!";
endif;
endif;
endif;
// Output
$title = "Änderung des Passwortes";
?>
<html lang="de">
<head>
<title>PASSWORTÄNDERUNG</title>
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
<style type="text/css">
<?php include_once ("../css/navigation.css.php"); ?>
</style>
<?php include_once ("../include/js_framework.inc.php"); ?>
<script src="../include/checkFormTags.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
// NAVIGATION
<?php echo $jsMenuOut; ?>
function finishPage(f_act,text) {
// if (confirm(text)) {
document.forms[0].f_act.value = f_act;
document.forms[0].submit();
// }
};
-->
</script>
<noscript>
<center>
<b><br>JavaScript ist nicht verf&uuml;gbar. Bitte aktivieren Sie JavaScript<br><br>
in Ihrem Browser, damit diese Seite ordnungsgem&auml;&szlig; funktioniert!</b><br><br>
</center>
</noscript>
</head>
<body onLoad="<?php echo $phpCurrentNavigationOnLoad ?>">
<?php echo $phpMenuOut ?>
<?php echo $phpReducedMenuOut ?>
<?php echo $phpPageTitelOut ?>
<div class="maincontent" name="maincontent" id="maincontent">
<form action="../courier/cr_changepwd.php" method="post">
<input type="hidden" name="f_act" value="">
<?php echo htmlDivLineSpacer("30px"); ?>
<div class="f12bp1_blue">
<?php echo $title ?>
</div>
<?php echo htmlDivLineSpacer("25px"); ?>
<div>
Das Passwort muss aus mindestens 8 Zeichen bestehen (Buchstaben, Zahlen, Sonderzeichen)
</div>
<?php echo htmlDivLineSpacer("25px"); ?>
<div>
<div <?php echo setStyleHtmlDiv("150px","left"); ?>>Aktuelles Passwort:</div>
<div>
<input type="password" name="f_currentPassword" value="" size="15">
</div>
</div>
<?php echo htmlDivLineSpacer("10px"); ?>
<div>
<div <?php echo setStyleHtmlDiv("150px","left"); ?>>Neues Passwort:</div>
<div>
<input type="password" name="f_newPassword" value="" size="15">
</div>
</div>
<?php echo htmlDivLineSpacer("5px"); ?>
<div>
<div <?php echo setStyleHtmlDiv("150px","left"); ?>>Wiederholung:</div>
<div>
<input type="password" name="f_newPassword2" value="" size="15">
</div>
</div>
<?php echo htmlDivLineSpacer("20px"); ?>
<?php echo defineButton("Passwort&nbsp;setzen", "action_pwd", "finishPage('setPassword');", "", "", "", "", "140px"); ?>
<?php echo htmlDivLineSpacer("20px"); ?>
<div class="f10bp1_red">
<?php echo $statusMessage; ?>
</div>
</form>
</div>
</body>
</html>

18
html/courier/index.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="de">
<head>
<title>votian</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="votian"> <meta name="keywords" content="votian">
<meta http-equiv="refresh" content="0; URL=../index.php">
<link rel="stylesheet" type="text/css" href="css/phoenix.css">
</head>
<body bgcolor="#FFFFFA" leftmargin="1" topmargin="1" marginwidth="0" marginheight="0" link="#990000" vlink="#990000" alink="#990000">
<a href="../index.php">Bitte hier klicken, wenn Sie nicht automatisch weitergeleitet werden...</a>
</body>
</html>

View File

@@ -0,0 +1,222 @@
<?php
/*=======================================================================
*
* jb_detail.php
*
* Autor: Marc Vollmann
*
=======================================================================*/
include_once ("../include/services_func.inc.php");
include_once ("../include/mcglobal.inc.php");
if ($phpVersion >= "7.0") :
require("../PEAR/HTML/Template/IT.php");
else :
require("HTML/IT.php");
endif;
// Check HTTP-Parameters
getSecHttpVars("1",array("f_act", "f_jb_id"));
// --- JOB -------------------
// initialize
$titles = "Nr.,Tourenname,Kostenstelle,Fahrz.,Bez.,Auslage,Gewicht,Auftragszeit,Reserv.,Kurier,Storno,Spät.Annahmez.,Annahme";
$titlesArray = spliti(",",$titles);
$titlesLength = count($titlesArray);
$fields = "jb_id,jb_tourname,csc_name,vht_value,csc_id_payer,jb_outlay,jb_weight,jb_ordertime,jb_reserv,cr_id,jb_storno,jb_latesttaketime,jb_taketime";
$fieldsArray = spliti(",",$fields);
$fieldsLength = count($fieldsArray);
$fieldClause = getDBFields("job") . "," . getDBFields("vehicletype") . "," . getDBFields("jobstatus") . "," . getDBFields("costcenter") . "," . getDBFields("jb_latesttaketime");
$fromClause = "job AS jb, costcenter AS csc, metatype AS vht, metatype AS jbs ";
$whereClause = "jb.hq_id = " . $hq_id . " AND ";
$whereClause = "jb.jb_id = " . $f_jb_id . " AND ";
$whereClause .= "(jb.csc_id = csc.csc_id) AND ";
$whereClause .= "(jb.vht_id = vht.mt_sort AND vht.mt_type = 'vehicletype') AND ";
$whereClause .= "(jb.jb_status = jbs.mt_sort AND jbs.mt_type = 'job_status') ";
$orderByClause = "";
$sqlquery = generateStatement($fieldClause,$fromClause,$whereClause,$orderByClause);
// Send request to database
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
// Job-data
$jobentry = "";
$jobCourierId = "";
while ($row = $result->fetch_assoc()):
$jobentry .= "<tr>";
$jobentry .= "<td align=\"left\">" . $titlesArray[$i] . "</td>";
$tmpVarName = $fieldsArray[$i];
${$tmpVarName} = $row[$tmpVarName];
// Get the current courier-ID of the job
if ($tmpVarName == "cr_id") : $jobCourierId = $row[cr_id]; endif;
$jobentry .= "<td bgcolor=\"" . $cellColor ."\" align=\"left\">" . $out . "</td>";
$jobentry .= "</tr>";
endwhile;
$result->free();
// --- TOUR ------------------
// initialize
$titles = "Firma,,Kostenstelle,Straße,PLZ,Ort,Hausnr.,Person,Tel.,Bemerk,Status";
$titlesArray = spliti(",",$titles);
$titlesLength = count($titlesArray);
$fields = "tr_comp,tr_comp2,csc_name,ad_street,ad_zipcode,ad_city,tr_hsno,tr_person,tr_phone,tr_remark,tr_status";
$fieldsArray = spliti(",",$fields);
$fieldsLength = count($fieldsArray);
$fieldClause = getDBFields("tour") . "," . getDBFields("address") . "," . getDBFields("costcenter") . " ";
$fromClause = "tour AS tr, address AS ad, costcenter AS csc ";
$whereClause = "tr.jb_id = " . $f_jb_id . " AND tr.ad_id = ad.ad_id AND tr.csc_id = csc.csc_id";
$orderByClause = "tr.tr_sort";
$sqlquery = generateStatement($fieldClause,$fromClause,$whereClause,$orderByClause);
// Send request to database
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
// Tour-data
$tourentry = "";
$rowCounter = 0;
while ($row = $result->fetch_assoc()):
$rowCounter++;
$tourentry .= "<td><table>";
for ($i = 0; $i < $fieldsLength; $i++) :
$tourentry .= "<tr>";
if ($rowCounter == 1) :
$tourentry .= "<td align=\"left\">" . $titlesArray[$i] . "</td>";
elseif ($i == floor($fieldsLength / 2)) :
$tourentry .= "<td><img src=\"../images/arrow_right.jpg\" border=\"0\" height=\"10\" width=\"25\"></td>";
else :
$tourentry .= "<td>&nbsp;</td>";
endif;
$tmpVarName = $fieldsArray[$i];
${$tmpVarName} = $row[$tmpVarName];
$out = formatOutput(${$tmpVarName},$outputFormatField[$tmpVarName]);
// special formatting for tour-fields
if ($tmpVarName == "tr_status") :
switch($out) {
case "0" : $out = "offen"; break;
case "1" : $out = "erledigt"; break;
};
endif;
$tourentry .= "<td bgcolor=\"" . $cellColor ."\" align=\"left\">" . $out . "</td>";
$tourentry .= "</tr>";
endfor;
$tourentry .= "</table></td>";
endwhile;
$result->free();
// Output of the whole tour
if ($rowCounter > 1) :
$tpl->setCurrentBlock("tourentry");
$tpl->setVariable("_tourentry_", $tourentry);
$tpl->parseCurrentBlock("tourentry");
endif;
// --- COURIER ------------------
// Initialize for template-output
$courierentry = "";
if ($jobCourierId != "") :
// initialize
$titles = "Firma,,Name,Vorname,SID,Online";
$titlesArray = spliti(",",$titles);
$titlesLength = count($titlesArray);
$fields = "cmp_comp,cmp_comp2,usr_name,usr_firstname,cr_sid,cr_available";
$fieldsArray = spliti(",",$fields);
$fieldsLength = count($fieldsArray);
$fieldClause = getDBFields("courier") . "," . getDBFields("company") . "," . getDBFields("user") . " ";
$fromClause = "courier AS cr, company AS cmp, user AS usr ";
$whereClause = "cr.cr_id = " . $jobCourierId . " AND cmp.cmp_id = cr.cmp_id AND usr.usr_id = cr.usr_id";
$orderByClause = "";
$sqlquery = generateStatement($fieldClause,$fromClause,$whereClause,$orderByClause);
// Send request to database
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
// Courier-data
$courierentry .= "<tr><td>KURIER:</td></tr>";
while ($row = $result->fetch_assoc()):
// $courierentry .= "<td><table>";
for ($i = 0; $i < $fieldsLength; $i++) :
if ($i % 2 == 0) : $cellColor = "#BBBBFF"; $cellColor2 = "#DDDDDD"; endif;
if ($i % 2 == 1) : $cellColor = "#CCCCFF"; $cellColor2 = "#EEEEEE"; endif;
if (trim($titlesArray[$i]) == "") : $titlesArray[$i] = "&nbsp;"; endif;
$courierentry .= "<tr>";
$courierentry .= "<td bgcolor=\"" . $cellColor2 ."\" align=\"left\">" . $titlesArray[$i] . "</td>";
$tmpVarName = $fieldsArray[$i];
${$tmpVarName} = $row[$tmpVarName];
$out = formatOutput(${$tmpVarName},$outputFormatField[$tmpVarName]);
// special formatting for tour-fields
if ($tmpVarName == "cr_available") :
switch($out) {
case "0" : $out = "nicht online"; break;
case "1" : $out = "online"; break;
};
endif;
$courierentry .= "<td bgcolor=\"" . $cellColor ."\" align=\"left\">" . $out . "</td>";
$courierentry .= "</tr>";
endfor;
// $courierentry .= "</table></td>";
endwhile;
$result->free();
endif;
// Output of the courier-data
$tpl->setCurrentBlock("courierentry");
$tpl->setVariable("_courierentry_", $courierentry);
$tpl->parseCurrentBlock("courierentry");
// --- JOB-COSTS ------------------
$jobcosts = "<tr><td>KOSTEN:</td></tr>";
$jobcosts .= "<tr><td bgcolor=\"#BBBBFF\">";
$jobCostArr = getJobCostsByID($f_jb_id);
foreach ($jobCostArr as $costArr) {
$jobcosts .= "Zahler: " . $costArr[0] . "<br>";
for ($j = 0; $j < (count($costArr[1]) - 1); $j++):
$jobcosts .= $costArr[1][$j][0] . ": " . number_format($costArr[1][$j][1], 2, ',', '.') . "<br>";
endfor;
$jobcosts .= "<span style=\"color:red\"><i>" . $costArr[1][$j][0] . "</i></span>: ";
$jobcosts .= "<span style=\"color:red\"><i>" . number_format($costArr[1][$j][1], 2, ',', '.') . "</i></span>" . "<br>";
}
$jobcosts .= "</td></tr>";
// Output of the job-costs
$tpl->setCurrentBlock("jobcosts");
$tpl->setVariable("_jobcosts_", $jobcosts);
$tpl->parseCurrentBlock("jobcosts");
$tpl->show();
// endif;
?>

View File

@@ -0,0 +1,77 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="de">
<head>
<title>VERWALTUNG</title>
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
<script type="text/javascript">
<!--
-->
</script>
<noscript>
<center>
<b><br>JavaScript ist nicht verf&uuml;gbar. Bitte aktivieren Sie JavaScript<br><br>
in Ihrem Browser, damit diese Seite ordnungsgem&auml;&szlig; funktioniert!</b><br><br>
</center>
</noscript>
</head>
<body>
<form action="../customer/jb_list.php" method="post" target="frame_content">
<input type="hidden" name="customerId" value="<!-- BEGIN customerId -->{_customerId_}<!-- END customerId -->">
<input type="hidden" name="cscIdRoot" value="<!-- BEGIN cscIdRoot -->{_cscIdRoot_}<!-- END cscIdRoot -->">
<input type="hidden" name="cscIdActual" value="<!-- BEGIN cscIdActual -->{_cscIdActual_}<!-- END cscIdActual -->">
<input type="hidden" name="empIdMaster" value="<!-- BEGIN empIdMaster -->{_empIdMaster_}<!-- END empIdMaster -->">
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<tr>
<td valign="top">
<!-- JOB-DATA -->
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<tr><td>AUFTRAG:</td></tr>
<!-- BEGIN jobentry -->
{_jobentry_}
<!-- END jobentry -->
</table>
</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td valign="top">
<!-- COURIER-DATA -->
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<!-- BEGIN courierentry -->
{_courierentry_}
<!-- END courierentry -->
</table>
</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td valign="top">
<!-- JOB-COSTS -->
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<!-- BEGIN jobcosts -->
{_jobcosts_}
<!-- END jobcosts -->
</table>
</td>
</tr>
</table>
<br><br>
<!-- TOUR-DATA -->
TOUR:<br>
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<tr>
<!-- BEGIN tourentry -->
{_tourentry_}
<!-- END tourentry -->
</tr>
</table>
</form>
</body>
</html>