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:
@@ -0,0 +1,276 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<br />
|
||||
<div id='monthview'>
|
||||
<a href='?action=termin&show=list'><span class='cal-list' title="Terminliste anzeigen" style='position: absolute; left: 50%;top: -11em;'></span></a><br />
|
||||
<a href='?action=termin&show=month&page={$page-1}'><span class='left' title="6 Monate zurück" style='position: absolute; left: 0;top: -8em;'></span></a>
|
||||
<a href='?action=termin&show=month&page=0'><span class='now' title="heute" style='position: absolute; left: 50%;top: -8em;'></span></a>
|
||||
<a href='?action=termin&show=month&page={$page+1}'><span class='right' title="6 Monate Tage vor" style='position: absolute; right: 0;top: -8em;'></span></a>
|
||||
{if $page == 0}
|
||||
{*<a href='?action=terminadd&date=0' title='Neuer Termin'>*}<div class='nowweekdaybg'></div>{*</a>*}
|
||||
{else}
|
||||
<div class='weekdaybg' style='left: 14em;'>
|
||||
</div>
|
||||
{/if}
|
||||
{foreach $weekdays as $weekday}
|
||||
{$lastarbtermend = 0}
|
||||
{if $i == 1 && $page == 0}
|
||||
<div class='nowweekdayhead' style='left: {10*$i+3.5}em;'>{$weekday.weekday}
|
||||
<a href='?action=terminshow&id=1&date={$weekday.date}&type=singlepages'><span class='print' title="Alle Termine von heute drucken" style='position:absolute;top: 0em;right:0em;'></span></a>
|
||||
</div>
|
||||
{else if {$weekday.weekday|substr:0:7} != "Samstag" && {$weekday.weekday|substr:0:7} != "Sonntag"}
|
||||
<div class='weekdayhead' style='left: {10*$i+3.5}em;'>{$weekday.weekday}<br />
|
||||
<a href='?action=terminshow&id=1&date={$weekday.date}&type=singlepages'><span class='print' title="Alle Termine an diesem Tag drucken" style='position:absolute;top: 0em;right:0em;'></span></a>
|
||||
</div>
|
||||
{*<a href='?action=terminadd&date={$i-1}' title='Neuer Termin'>*}<div class='weekdaybg' style='left: {10*$i+4}em;'></div>{*</a>*}
|
||||
{else}
|
||||
<div class='weekdayhead' style='left: {10*$i+3.5}em;background-color: #FFDDDD;'>{$weekday.weekday}<br />
|
||||
<a href='?action=terminshow&id=1&date={$weekday.date}&type=singlepages'><span class='print' title="Alle Termine an diesem Tag drucken" style='position:absolute;top: 0em;right:0em;'></span></a>
|
||||
</div>
|
||||
{*<a href='?action=terminadd&date={$i-1}' title='Neuer Termin'>*}<div class='weekdaybg' style='left: {10*$i+4}em;background-color: #FFFFFF;'></div>{*</a>*}
|
||||
{/if}
|
||||
<div class='weekday_line' style='left: {10*$i+3.5}em;'></div>
|
||||
|
||||
{$shift = 0}
|
||||
{$prevtermin= ""}
|
||||
{$absmaxshift.{$weekday.weekday} = 1}
|
||||
{$absmaxshiftone.{$weekday.weekday} = 0}
|
||||
{$shiftone = 0}
|
||||
{foreach $weekday.termine as $key=>$termin}
|
||||
|
||||
{if {$termin.termdauer} == "24:00:00"}
|
||||
{$termin.termdauer = "23:59:59"}
|
||||
{/if}
|
||||
{if {$prevtermin.termtime|date_format:"%H%M"} <= {$termin.termtime|date_format:"%H%M"} && {{$prevtermin.termtime|date_format:"%H%M"}+{$prevtermin.termdauer|date_format:"%H%M"}} > {$termin.termtime|date_format:"%H%M"}} {*starttime of next term is within the prev term*}
|
||||
{if {$prevtermin.termdauer} == "23:59:59"}
|
||||
{$shiftone = $shiftone+1}
|
||||
{else}
|
||||
{$shift = $shift+1}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $termin.termdauer == "23:59:59"}
|
||||
{if $termin.user2 > 0}
|
||||
{$shiftone = $shiftone+1}
|
||||
{/if}
|
||||
{if $termin.user3 > 0}
|
||||
{$shiftone = $shiftone+1}
|
||||
{/if}
|
||||
{if $termin.user4 > 0}
|
||||
{$shiftone = $shiftone+1}
|
||||
{/if}
|
||||
{else}
|
||||
{if $termin.user2 > 0}
|
||||
{$shift = $shift+1}
|
||||
{/if}
|
||||
{if $termin.user3 > 0}
|
||||
{$shift = $shift+1}
|
||||
{/if}
|
||||
{if $termin.user4 > 0}
|
||||
{$shift = $shift+1}
|
||||
{/if}
|
||||
{/if}
|
||||
{$weekday.termine.{$key}.shift = $shift}
|
||||
{$weekday.termine.{$key}.shiftone = $shiftone}
|
||||
|
||||
{if $shift+1 > $absmaxshift.{$weekday.weekday}}
|
||||
{$absmaxshift.{$weekday.weekday} = $shift+1}
|
||||
{/if}
|
||||
{if $shiftone > $absmaxshiftone.{$weekday.weekday}}
|
||||
{$absmaxshiftone.{$weekday.weekday} = $shiftone}
|
||||
{/if}
|
||||
{$prevtermin = $termin}
|
||||
{/foreach}
|
||||
|
||||
{$width = ((18 / $absmaxshift.{$weekday.weekday})-$absmaxshiftone.{$weekday.weekday})}
|
||||
{foreach $weekday.termine as $key=>$termin}
|
||||
|
||||
{$shift = 10*$i + 3.9 + ($width/2)*$termin.shift + $termin.shiftone}
|
||||
{if {$termin.termdauer} == '24:00:00'}
|
||||
{$terminlength = 960}
|
||||
{$terminstart = 390}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<a href='?action=terminshow&id={$termin.main_id}'>
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: 1em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname} {$termin.usernname}</b><br /> Ganztags<br />{if {$termin.ort}}<b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />{/if}{if {$termin.vname} || {$termin.nname} || {$termin.firma}}Bei {$termin.vname} {$termin.nname} {$termin.firma}{/if}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{else}
|
||||
{$terminlength = ({$termin.termdauer|date_format:"%H"}*60 + {$termin.termdauer|date_format:"%M"})}
|
||||
{$terminstart = ({$termin.termtime|date_format:"%H"}*60 + {$termin.termtime|date_format:"%M"})}
|
||||
{if {$terminstart} == 0}
|
||||
<a href='?action=projectadd&id={$termin.projectid}'>
|
||||
{$terminlength = {$termin.termdauer}*60}
|
||||
{$terminstart = 450+$lastarbtermend}
|
||||
{$lastarbtermend = $terminstart-450 + $termin.termdauer * 60}
|
||||
{$termin.typ = 'Arbeitsleistung'}
|
||||
{else}
|
||||
<a href='?action=terminshow&id={$termin.main_id}'>
|
||||
{/if}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
{if {$termin.typ} != 'Arbeitsleistung'}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: {$width}em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user}.color}'
|
||||
title='
|
||||
{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname} {$termin.usernname}</b><br />
|
||||
Um {$termin.termtime|date_format:'%k:%M'}Uhr<br />Dauer {if {$termin.termdauer|date_format:'%k'} > 0} {$termin.termdauer|date_format:'%k'}h{/if}
|
||||
{if {$termin.termdauer|date_format:'%M'} > 0}{$termin.termdauer|date_format:'%M'}min{/if}<br />
|
||||
<b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />
|
||||
Bei {$termin.vname} {$termin.nname} {$termin.firma}'>
|
||||
{else}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: {$width/3}em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {if $termin.done}#CFC{else}{$users.{$termin.user}.color}{/if}'
|
||||
title='
|
||||
{$termin.typ} -
|
||||
{$termin.firma} {$termin.vname} {$termin.nname}<br />
|
||||
<b>{$termin.projectname}</b> <br />
|
||||
{$termin.head}<br />
|
||||
<b>Dauer: </b>{if {$termin.termdauer} > 1} {$termin.termdauer|string_format:"%.1f"}h{/if}<br />
|
||||
{/if}
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{/if}
|
||||
</a>
|
||||
{if $termin.user2}
|
||||
{$shift = 10*$i + 3.9 + ($width)*($termin.shift-1) + $termin.shiftone}
|
||||
<a href='?action=terminshow&id={$termin.main_id}'>
|
||||
{if {$termin.termdauer} == '24:00:00'}
|
||||
{$terminlength = 960}
|
||||
{$terminstart = 390}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: 1em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user2}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname2} {$termin.usernname2}</b><br /> Ganztags<br />{if {$termin.ort}}<b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />{/if}{if {$termin.vname} || {$termin.nname} || {$termin.firma}}Bei {$termin.vname} {$termin.nname} {$termin.firma}{/if}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{else}
|
||||
{$terminlength = ({$termin.termdauer|date_format:"%H"}*60 + {$termin.termdauer|date_format:"%M"})}
|
||||
{$terminstart = ({$termin.termtime|date_format:"%H"}*60 + {$termin.termtime|date_format:"%M"})}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: {$width}em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user2}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname2} {$termin.usernname2}</b><br /> Um {$termin.termtime|date_format:'%k:%M'}Uhr<br />Dauer {if {$termin.termdauer|date_format:'%k'} > 0} {$termin.termdauer|date_format:'%k'}h{/if} {if {$termin.termdauer|date_format:'%M'} > 0}{$termin.termdauer|date_format:'%M'}min{/if}<br /> <b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />Bei {$termin.vname} {$termin.nname} {$termin.firma}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{if $termin.user3}
|
||||
{$shift = 10*$i + 3.9 + ($width)*($termin.shift-2) + $termin.shiftone}
|
||||
<a href='?action=terminshow&id={$termin.main_id}'>
|
||||
{if {$termin.termdauer} == '24:00:00'}
|
||||
{$terminlength = 960}
|
||||
{$terminstart = 390}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: 1em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user3}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname3} {$termin.usernname3}</b><br /> Ganztags<br />{if {$termin.ort}}<b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />{/if}{if {$termin.vname} || {$termin.nname} || {$termin.firma}}Bei {$termin.vname} {$termin.nname} {$termin.firma}{/if}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{else}
|
||||
{$terminlength = ({$termin.termdauer|date_format:"%H"}*60 + {$termin.termdauer|date_format:"%M"})}
|
||||
{$terminstart = ({$termin.termtime|date_format:"%H"}*60 + {$termin.termtime|date_format:"%M"})}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: {$width}em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user3}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname3} {$termin.usernname3}</b><br /> Um {$termin.termtime|date_format:'%k:%M'}Uhr<br />Dauer {if {$termin.termdauer|date_format:'%k'} > 0} {$termin.termdauer|date_format:'%k'}h{/if} {if {$termin.termdauer|date_format:'%M'} > 0}{$termin.termdauer|date_format:'%M'}min{/if}<br /> <b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />Bei {$termin.vname} {$termin.nname} {$termin.firma}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{if $termin.user4}
|
||||
{$shift = 10*$i + 3.9 + ($width)*($termin.shift-3) + $termin.shiftone}
|
||||
<a href='?action=terminshow&id={$termin.main_id}'>
|
||||
{if {$termin.termdauer} == '24:00:00'}
|
||||
{$terminlength = 960}
|
||||
{$terminstart = 390}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: 1em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user4}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname4} {$termin.usernname4}</b><br /> Ganztags<br />{if {$termin.ort}}<b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />{/if}{if {$termin.vname} || {$termin.nname} || {$termin.firma}}Bei {$termin.vname} {$termin.nname} {$termin.firma}{/if}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{else}
|
||||
{$terminlength = ({$termin.termdauer|date_format:"%H"}*60 + {$termin.termdauer|date_format:"%M"})}
|
||||
{$terminstart = ({$termin.termtime|date_format:"%H"}*60 + {$termin.termtime|date_format:"%M"})}
|
||||
{$height = ($terminlength/15)}
|
||||
{$start = 4 + ($terminstart - 420)/15}
|
||||
<div class='{if $termin.done == 1}doneterminbox{else}terminbox{/if}'
|
||||
style='width: {$width}em;height: {$height}em;top: {$start}em;left: {$shift}em;background-color: {$users.{$termin.user4}.color}'
|
||||
title='{$termin.typ}<br />{$termin.head} - <b>{$termin.uservname4} {$termin.usernname4}</b><br /> Um {$termin.termtime|date_format:'%k:%M'}Uhr<br />Dauer {if {$termin.termdauer|date_format:'%k'} > 0} {$termin.termdauer|date_format:'%k'}h{/if} {if {$termin.termdauer|date_format:'%M'} > 0}{$termin.termdauer|date_format:'%M'}min{/if}<br /> <b>In {$termin.ort}{if $termin.ortsteil}-{$termin.ortsteil}{/if}</b><br />Bei {$termin.vname} {$termin.nname} {$termin.firma}'>
|
||||
<span class='rotate'>{$termin.typ|substr:0:3}.</span>
|
||||
</div>
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{$i=$i+1}
|
||||
{/foreach}
|
||||
|
||||
{$i = 0}
|
||||
{while $i < 16}
|
||||
{$i = $i+1}
|
||||
<div class='hourline_desc' style='top: {$i*4-0.5}em'>{{$i+6}|str_pad:2:'0':0}:00</div>
|
||||
<div class='hourline' style='top: {$i*4}em'></div>
|
||||
{/while}
|
||||
{$time = {$smarty.now|date_format:"%H"}*60 + {$smarty.now|date_format:"%M"}}
|
||||
<div id='timeline' style='top: {4 + ($time - 420)/15}em'></div>
|
||||
|
||||
{if $page == 0}
|
||||
{for $i = 1 to 7}
|
||||
<div class='weatherinfo' style="left: {3+10*$i}em;background-image: url('{$weather.{$i}.icon}');">
|
||||
{$weather.{$i}.low}°C - {$weather.{$i}.high}°C
|
||||
</div>
|
||||
{/for}
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
{foreach $users as $user}
|
||||
<a href='?action=terminadd&user={$user.id}' style="color: #000;" title='Urlaub eintragen'><span class='legendcolbox' style='background-color: {$user.color}'>{$user.vname} {$user.nname}</span></a>
|
||||
{/foreach}
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(".terminbox").tooltip({
|
||||
track: true,
|
||||
delay: 0,
|
||||
showURL: false,
|
||||
showBody: " - ",
|
||||
|
||||
});
|
||||
$(".doneterminbox").tooltip({
|
||||
track: true,
|
||||
delay: 0,
|
||||
showURL: false,
|
||||
showBody: " - ",
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user