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
+199
View File
@@ -0,0 +1,199 @@
{include file="heading.tpl" heading=$head}
<div class="widthlimiter">
<form action="?action={$frmact}&do=adress&kunde={$kunde|escape}&formsent=1&adressid={$adressid}" name="mainform" method='POST'>
<fieldset>
<label>Adresstyp:</label><select name="typ" id="typ" >
{if $typ == 1}
<option value='1'>Hauptadresse</option>
{else}
{html_options values=$typids output=$typs selected="{$typ}"}
{/if}
</select><br />
<label>Firma:</label><input name='firma' id='firma' value="{$firma|escape}" /><br />
<label>Straße/Hausnr:</label><input name='str' id='str' value="{$str|escape}" pattern="[^0-9]*" /><input name='hnr' id='hnr' value="{$hnr|escape}" pattern="([0-9/a-zA-Z-\s\/]*[-/])?[0-9/a-zA-Z-\s\/]*" /><br />
<label>PLZ/Ort:</label><input name='plz' id='plz' value="{$plz|escape}" pattern="[0-9/a-zA-Z-]*" /><input name='ort' id='ort' value="{$ort|escape}" pattern="[^0-9]*" /><br />
<label>Ortsteil:</label><input name='oteil' id='oteil' value="{$oteil|escape}" pattern="[^0-9]*" /><br />
<label>Land:</label><input name='land' id='land' value="{$land|escape}" pattern="[^0-9]*" /><br />
<label>Zusatz:</label><input name='zusatz' id='zusatz' value="{$zusatz|escape}" /><br />
<input type="hidden" name='overwrite' id='overwrite' value="0" />
<button type="button" class='spell' onclick="$('textarea:not(#personalnotes,#globalnotes),input:not([type=radio])').spellCheckInDialog()">Rechtschreibung prüfen</button><br />
</fieldset>
<fieldset>
<legend>Erste Person</legend>
<label>Anrede:</label><select name="anrede" id="anrede" >
{html_options values=$anrids output=$anrs selected="{$anrede}"}
</select><br />
<label>Titel:</label><select name="titel" id="titel" >
{html_options values=$titelids output=$titels selected="{$titel}"}
</select><br />
<label>Vorname:</label><input name='vname' id='vname' value="{$vname|escape}" pattern="[^0-9]*" /><br />
<label>Nachname:</label><input name='nname' id='nname' value="{$nname|escape}" pattern="[^0-9]*" /><br />
<label>Geburtsdatum:</label><input name='gebdat' id='gebdat' value="{$gebdat|escape}" pattern="\d{ldelim}2{rdelim}\.\d{ldelim}2{rdelim}(\.\d{ldelim}4{rdelim})?" /><br />
</fieldset>
<fieldset>
<legend>Zweite Person</legend>
<label>Anrede 2:</label><select name="anrede2" id="anrede2" >
{html_options values=$anrids output=$anrs selected="{$anrede2}"}
</select><br />
<label>Titel 2:</label><select name="titel2" id="titel2" >
{html_options values=$titelids output=$titels selected="{$titel2}"}
</select><br />
<label>Vorname2:</label><input name='vname2' id='vname2' value="{$vname2|escape}" pattern="[^0-9]*" /><br />
<label>Nachname2:</label><input name='nname2' id='nname2' value="{$nname2|escape}" pattern="[^0-9]*" /><br />
<label>Geburtsdatum2:</label><input name='gebdat2' id='gebdat2' value="{$gebdat2|escape}" pattern="\d{ldelim}2{rdelim}\.\d{ldelim}2{rdelim}(\.\d{ldelim}4{rdelim})?" /><br />
</fieldset>
<fieldset id='telset'>
<legend>Telefon:</legend>
<label>Nummer:</label><input name='nr' id='nr' value="{$nr|escape}" pattern="[0-9-]*" /><br />
<label>Vorwahl:</label><input name='vwahl' id='vwahl' value="{$vwahl|escape}" pattern="[0-9]*" /><br />
<label>PLZ/Ort:</label><input name='telplz' id='telplz' value="{$telplz|escape}" pattern="[0-9/a-zA-Z-]*" /><input name='telort' id='telort' value="{$telort|escape}" pattern="[^0-9]*" /><br />
<label>Ortsteil:</label><input name='teloteil' id='teloteil' value="{$teloteil|escape}" pattern="[^0-9]*" /><br />
<label>Land:</label><input name='telland' id='telland' value="{$telland|escape}" pattern="[^0-9]*" /><br />
<button type="button" class='spell' onclick="$('textarea:not(#personalnotes,#globalnotes),input:not([type=radio])').spellCheckInDialog()">Rechtschreibung prüfen</button><br />
</fieldset>
<br />
{if $adressid > 0}
<button type='button' onClick='askoverwrite("Möchten Sie sämtliche alte Rechnungen auf diese Adresse auch ändern?")' name='ask'>Speichern</button>
{else}
<button type='button' onClick='document.getElementById("overwrite").value = 1;document.forms["mainform"].submit();' name='ask'>Speichern</button>
{/if}
</form>
</div>
<script>
if($("#typ").val() == 5)
{
$("#telset").show();
}
else
{
$("#telset").hide();
}
$("#typ").change(function() {
if($("#typ").val() == 5)
{
$("#telset").show();
}
else
{
$("#telset").hide();
}
});
$(function() {
$( "#str" ).autocomplete({
source: "ajax/auto/str.php",
minLength: 2,
focus: function( event, ui ) {
$( "#ort" ).val( ui.item.ort);
$( "#plz" ).val( ui.item.plz);
$( "#oteil" ).val( ui.item.otl);
$( "#land" ).val( ui.item.lnd);
return false;
}
});
});
$(function() {
$( "#plz" ).autocomplete({
source: "ajax/auto/plz.php",
minLength: 2,
focus: function( event, ui ) {
$( "#ort" ).val( ui.item.ort);
$( "#land" ).val( ui.item.lnd);
return false;
}
});
});
$(function() {
$( "#ort" ).autocomplete({
source: "ajax/auto/ort.php",
minLength: 2,
focus: function( event, ui ) {
$( "#land" ).val( ui.item.lnd);
$( "#plz" ).val( ui.item.plz);
return false;
}
});
});
$(function() {
$( "#oteil" ).autocomplete({
source: "ajax/auto/oteil.php",
minLength: 2,
focus: function( event, ui ) {
$( "#ort" ).val( ui.item.ort);
$( "#land" ).val( ui.item.lnd);
$( "#plz" ).val( ui.item.plz);
return false;
}
});
});
$(function() {
$( "#vwahl" ).autocomplete({
source: "ajax/auto/vwahl.php",
minLength: 2,
focus: function( event, ui ) {
$( "#telplz" ).val( ui.item.plz);
$( "#telort" ).val( ui.item.ort);
$( "#telland" ).val( ui.item.lnd);
$( "#teloteil" ).val( ui.item.otl);
return false;
}
});
});
$(function() {
$( "#telplz" ).autocomplete({
source: "ajax/auto/plz.php",
minLength: 2,
focus: function( event, ui ) {
$( "#telort" ).val( ui.item.ort);
$( "#telland" ).val( ui.item.lnd);
$( "#vwahl" ).val( ui.item.vwl);
return false;
}
});
});
$(function() {
$( "#telort" ).autocomplete({
source: "ajax/auto/ort.php",
minLength: 2,
focus: function( event, ui ) {
$( "#telland" ).val( ui.item.lnd);
$( "#telplz" ).val( ui.item.plz);
$( "#vwahl" ).val( ui.item.vwl);
return false;
}
});
});
$(function() {
$( "#teloteil" ).autocomplete({
source: "ajax/auto/oteil.php",
minLength: 2,
focus: function( event, ui ) {
$( "#telort" ).val( ui.item.ort);
$( "#telland" ).val( ui.item.lnd);
$( "#telplz" ).val( ui.item.plz);
$( "#vwahl" ).val( ui.item.vwl);
return false;
}
});
});
$(function() {
$( "#telland" ).autocomplete({
source: "ajax/auto/land.php",
minLength: 2,
focus: function( event, ui ) {
return false;
}
});
});
</script>
<div id="question">
</div>