Initialer Commit: Kundenverwaltung (PHP/Smarty)

Bestehende Codebasis als Ausgangsstand aufgenommen.

- .gitignore: Kundendaten (uploads_*), Smarty-Compile-Cache
  (templates_c), Laufzeit-Temp und Datenbank-Dumps ausgeschlossen;
  Verzeichnisstruktur ueber .gitkeep erhalten
- .gitattributes: Zeilenenden normalisiert (LF im Repo),
  Binaerformate markiert
- db-backup.php: MySQL-Zugangsdaten kommen jetzt wie im Rest der
  Anwendung aus der externen Konfiguration statt hartkodiert aus der
  Datei; Passwort wird ueber eine temporaere Optionsdatei statt per
  Kommandozeile uebergeben, Fehler von mysqldump/gzip werden gemeldet,
  Aufraeumen aelterer Backups berechnet Jahr und Monat konsistent

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 16:41:18 +02:00
co-authored by Claude Opus 5
commit e2124220e5
2225 changed files with 1070301 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
<?php
require_once("../incs/connectmysql.php");
require('../smarty/libs/Smarty.class.php');
$smarty = new Smarty;
if(isset($_GET["function"]) && !$err)
{
if($_GET["function"] == "newart" && isset($_GET["artnr"]))
{
$qry=mysqli_query($dbconn, "SELECT id,bezeichn FROM artikeltyp");
while($res=mysqli_fetch_assoc($qry))
{
$typids[] = $res["id"];
$typnames[] = $res["bezeichn"];
}
$smarty->assign("typids",$typids);
$smarty->assign("typs",$typnames);
$typids=array();
$typnames=array();
$qry=mysqli_query($dbconn, "SELECT id,einheit FROM einheit");
while($res=mysqli_fetch_assoc($qry))
{
$typids[] = $res["id"];
$typnames[] = $res["einheit"];
}
$smarty->assign("einhids",$typids);
$smarty->assign("einhs",$typnames);
$typids=array();
$typnames=array();
$qry=mysqli_query($dbconn, "SELECT id,mwst FROM mwst");
while($res=mysqli_fetch_assoc($qry))
{
if($res["mwst"] != "999")
{
$typids[] = $res["id"];
$typnames[] = $res["mwst"]." %";
}
else
{
$typids[] = $res["id"];
$typnames[] = "Normal";
}
}
$smarty->assign("artmwstids",$typids);
$smarty->assign("artmwsts",$typnames);
$smarty->assign("type",$_GET["type"]);
$smarty->assign("nr",($_GET["artnr"]+1));
$smarty->display("artblock.tpl");
}
elseif($_GET["function"] == "neweig" && isset($_GET["artnr"]))
{
$qry=mysqli_query($dbconn, "SELECT id,einheit FROM einheit");
while($res=mysqli_fetch_assoc($qry))
{
$typids[] = $res["id"];
$typnames[] = $res["einheit"];
}
$smarty->assign("einhids",$typids);
$smarty->assign("einhs",$typnames);
$smarty->assign("type",$_GET["type"]);
$smarty->assign("artnr",$_GET["artnr"]);
$smarty->assign("eignr",($_GET["eignr"]+1));
$smarty->display("eigblock.tpl");
}
}
?>