E-Mail über joomla. Status Überarbeitung.

This commit is contained in:
Jürgen Meyer
2025-12-20 10:03:05 +01:00
parent 783cffaf2b
commit 964ab1ca8b
7 changed files with 250 additions and 78 deletions
@@ -6147,10 +6147,9 @@ function adminOrdnungsstrafeMailen(): void
if (!benutzerZugriff("benutzerVeranstalterModerator")) if (!benutzerZugriff("benutzerVeranstalterModerator"))
keinZugriff(true); keinZugriff(true);
$query = "SELECT *, t2.verstoss, t2.paragraph_spo, t2.paragraph_go, t2.zusatztext, t10.regelwerk," $query = "SELECT *, t2.verstoss, t2.paragraph_spo, t2.paragraph_go, t2.zusatztext, t10.regelwerk,"
. "\n t4.teamname, t9.verein_id, t9.vereinsname, t8.name AS aussteller, t1.ausstelldatum, t1.status," . "\n t4.teamname, t9.verein_id, t9.vereinsname, t8.name AS aussteller, t1.ausstelldatum, t1.ordnungsstrafen_id,"
. "\n t7.bezeichnung as veranstaltung, CONCAT(t3.spieltag, '. Spieltag') as spieltag," . "\n t7.bezeichnung as veranstaltung, CONCAT(t3.spieltag, '. Spieltag') as spieltag, t7.saison_id,"
. "\n t3.spieltag_titel, DATE_FORMAT(t3.zeitpunkt, '%d.%m.%Y') AS spieldatum," . "\n t3.spieltag_titel, DATE_FORMAT(t3.zeitpunkt, '%d.%m.%Y') AS spieldatum,"
. "\n CONCAT(t5.teamname, ' - ', t6.teamname) AS begegnung," . "\n CONCAT(t5.teamname, ' - ', t6.teamname) AS begegnung,"
. "\n (t1.multiplikator * t2.gebuehr + t2.zusatzgebuehr) AS gebuehr" . "\n (t1.multiplikator * t2.gebuehr + t2.zusatzgebuehr) AS gebuehr"
@@ -6211,9 +6210,80 @@ function adminOrdnungsstrafeMailen(): void
$bcc = $vorlagen[0]->bcc; $bcc = $vorlagen[0]->bcc;
$subject = $vorlagen[0]->betreff; $subject = $vorlagen[0]->betreff;
$message = renderTemplate($template, $var); $message = renderTemplate($template, $var);
$back = "admin_ordnungsstrafen"; $backtomail = "admin_ordnungsstrafe_mailen&id=" . $id;
$backtosender = "admin_ordnungsstrafen";
HTML_sportsmanager_admin::adminMailto($to,$cc,$bcc,$subject,$message,$back); $vorlage = new stdClass();
$vorlage->id = $ordnungsstrafe->ordnungsstrafen_id;
$vorlage->name = 'Ordnungsstrafe';
HTML_sportsmanager_admin::adminMailto($to,$cc,$bcc,$subject,$message,$backtomail,$backtosender,$vorlage);
}
function sendJoomlaMail()
{
$db = getDatabase();
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
$config = Factory::getConfig();
$back = $db->escape(trim($jInput->get('back', '', 'RAW')));
$to = $db->escape(trim($jInput->get('an', '', 'RAW')));
$cc = $db->escape(trim($jInput->get('cc', '', 'RAW')));
$bcc = $db->escape(trim($jInput->get('bcc', '', 'RAW')));
$subject = $db->escape(trim($jInput->get('betreff', '', 'RAW')));
$body = nl2br(trim($jInput->get('nachricht', '', 'RAW')));
$isHtml = true;
// Joomla From-Adresse aus Konfiguration
$fromEmail = $config->get('mailfrom');
$fromName = 'STFV';
// Mailer erstellen über FactoryInterface
$mailer = Factory::getContainer()
->get(MailerFactoryInterface::class)
->createMailer();
// From setzen
$mailer->setSender([$fromEmail, $fromName]);
// Hauptempfänger
$toAddresses = array_map('trim', explode(';', $to));
foreach ($toAddresses as $recipient) {
if (!empty($recipient)) {
$mailer->addRecipient($recipient);
}
}
// CC-Empfänger
$ccAddresses = array_map('trim', explode(';', $cc));
foreach ($ccAddresses as $recipient) {
if (!empty($recipient)) {
$mailer->addCc($recipient);
}
}
// BCC-Empfänger
$bccAddresses = array_map('trim', explode(';', $bcc));
foreach ($bccAddresses as $recipient) {
if (!empty($recipient)) {
$mailer->addBcc($recipient);
}
}
// Betreff und Body
$mailer->setSubject($subject);
$mailer->setBody($body);
$mailer->isHtml($isHtml);
// Senden
$result = $mailer->send();
//return ($result === true) ? true : 'Fehler beim Versand: ' . $result->__toString();
if ($result === true)
redirectSportsManagerURL('&task=' . $back, Text::_('COM_SPORTSMANAGER_EMAIL_WAS_SEND'));
else
redirectSportsManagerURL('&task=' . $back, Text::_('COM_SPORTSMANAGER_EMAIL_WAS_NOT_SEND'));
} }
function adminOrdnungsstrafen(): void function adminOrdnungsstrafen(): void
@@ -6267,9 +6337,10 @@ function adminOrdnungsstrafen(): void
if (!isset($filter['aussteller'])) if (!isset($filter['aussteller']))
$filter['aussteller'] = 0; $filter['aussteller'] = 0;
$query = "SELECT *, t2.verstoss, t4.teamname, t9.vereinsname, t8.name, t1.ausstelldatum, t1.status," $query = "SELECT *, t2.verstoss, t4.teamname, t9.vereinsname, t8.name, t1.ausstelldatum,"
. "\n CONCAT(t5.teamname, ' - ', t6.teamname, ' (', t7.bezeichnung, ')') AS begegnung," . "\n CONCAT(t5.teamname, ' - ', t6.teamname, ' (', t7.bezeichnung, ')') AS begegnung,"
. "\n (t1.multiplikator * t2.gebuehr + t2.zusatzgebuehr) AS gebuehr" . "\n (t1.multiplikator * t2.gebuehr + t2.zusatzgebuehr) AS gebuehr,"
. "\n if (t1.rechnungsdatum IS NOT NULL, 'Rechnung erstellt', if (t1.versendedatum IS NOT NULL, 'Versendet', 'ausgestellt')) AS status"
. "\n FROM #__sportsmanager_ordnungsstrafen AS t1" . "\n FROM #__sportsmanager_ordnungsstrafen AS t1"
. "\n LEFT JOIN #__sportsmanager_verstoesse AS t2 ON t1.verstoesse_id = t2.verstoesse_id" . "\n LEFT JOIN #__sportsmanager_verstoesse AS t2 ON t1.verstoesse_id = t2.verstoesse_id"
. "\n LEFT JOIN #__sportsmanager_begegnung AS t3 ON t1.begegnung_id = t3.begegnung_id" . "\n LEFT JOIN #__sportsmanager_begegnung AS t3 ON t1.begegnung_id = t3.begegnung_id"
@@ -6303,12 +6374,17 @@ function adminEditOrdnungsstrafe(): void
$id = $jInput->get('id', 0, 'INT'); $id = $jInput->get('id', 0, 'INT');
$begegnungid = $jInput->get('begegnungid', 0, 'INT'); $begegnungid = $jInput->get('begegnungid', 0, 'INT');
$veranstaltungid = $jInput->get('veranstaltungid', 0, 'INT'); $veranstaltungid = $jInput->get('veranstaltungid', 0, 'INT');
$user_id = isExternalDatabase() ? 0 : (isJson() ? getUserID() : Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id);
if ($id == 0){ if ($id == 0){
$row = null; $row = null;
$user_id = isExternalDatabase() ? 0 : (isJson() ? getUserID() : Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id);
} else { } else {
$query = "SELECT * FROM #__sportsmanager_ordnungsstrafen WHERE ordnungsstrafen_id = $id"; $query = "SELECT t1.*, t2.name as aussteller, t3.name as versender, t4.name as rechnungssteller"
. "\n FROM #__sportsmanager_ordnungsstrafen AS t1"
. "\n LEFT JOIN #__users AS t2 ON t1.aussteller_id = t2.id"
. "\n LEFT JOIN #__users AS t3 ON t1.versender_id = t3.id"
. "\n LEFT JOIN #__users AS t4 ON t1.rechnungssteller_id = t4.id"
. "\n WHERE ordnungsstrafen_id = $id;";
$rows = loadObjectList($db, $query); $rows = loadObjectList($db, $query);
if (count($rows) < 1) die("Wrong id!"); if (count($rows) < 1) die("Wrong id!");
$row = $rows[0]; $row = $rows[0];
@@ -6319,12 +6395,12 @@ function adminEditOrdnungsstrafe(): void
if ($begegnungid == 0) if ($begegnungid == 0)
redirectSportsManagerURL('&task=admin_ordnungsstrafen', 'Missing id'); redirectSportsManagerURL('&task=admin_ordnungsstrafen', 'Missing id');
$query = "SELECT * FROM #__users WHERE id = '$user_id';"; $query = "SELECT id, name FROM #__users WHERE id = '$user_id';";
$aussteller = loadObjectList($db, $query); $aussteller = loadObjectList($db, $query);
$query = "SELECT t1.begegnung_id, t1.heim_team_id, t1.gast_team_id, t1.gast_team_id," $query = "SELECT t1.begegnung_id, t1.heim_team_id, t1.gast_team_id, t1.gast_team_id,"
. "\n t2.teamname AS heim_name, t3.teamname AS gast_name," . "\n t2.teamname AS heim_name, t3.teamname AS gast_name,"
. "\n t1.zeitpunkt, t1.spieltag, t1.spieltag_titel, t1.spiel_nr," . "\n t1.zeitpunkt, t1.spieltag, t1.spieltag_titel, t1.spiel_nr, t4.saison_id,"
. "\n t4.veranstaltung_id as veranstaltung_id, t4.bezeichnung AS veranstaltung, t4.regelwerke_id," . "\n t4.veranstaltung_id as veranstaltung_id, t4.bezeichnung AS veranstaltung, t4.regelwerke_id,"
. "\n CONCAT(t2.teamname, ' - ', t3.teamname, ' (', t4.bezeichnung, ')') AS begegnung" . "\n CONCAT(t2.teamname, ' - ', t3.teamname, ' (', t4.bezeichnung, ')') AS begegnung"
. "\n FROM #__sportsmanager_begegnung AS t1" . "\n FROM #__sportsmanager_begegnung AS t1"
@@ -6359,6 +6435,8 @@ function adminEditOrdnungsstrafe(): void
redirectSportsManagerURL('&task=admin_ordnungsstrafen'); redirectSportsManagerURL('&task=admin_ordnungsstrafen');
} }
$filter_saison_id = $jInput->get('filter_saison_id', 0, 'INT');
$user_id = isExternalDatabase() ? 0 : (isJson() ? getUserID() : Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id);
$id = $jInput->get('id', 0, 'INT'); $id = $jInput->get('id', 0, 'INT');
$verstoesse_id = $jInput->get('verstoesse_id', 0, 'INT'); $verstoesse_id = $jInput->get('verstoesse_id', 0, 'INT');
$begegnung_id = $jInput->get('begegnung_id', 0, 'INT'); $begegnung_id = $jInput->get('begegnung_id', 0, 'INT');
@@ -6369,28 +6447,62 @@ function adminEditOrdnungsstrafe(): void
$weitere_angaben = $db->escape(trim($jInput->get('weitere_angaben', '', 'RAW'))); $weitere_angaben = $db->escape(trim($jInput->get('weitere_angaben', '', 'RAW')));
$status = $db->escape($jInput->get('status', '', 'RAW')); $status = $db->escape($jInput->get('status', '', 'RAW'));
if ($id == 0) if ($jInput->get('save', false, 'BOOL')) {
$query = "INSERT INTO #__sportsmanager_ordnungsstrafen" if ($id == 0) {
. "\n (ordnungsstrafen_id,verstoesse_id,begegnung_id,team_id,aussteller_id,ausstelldatum,multiplikator,weitere_angaben,status)" $query = "INSERT INTO #__sportsmanager_ordnungsstrafen"
. "\n VALUES (NULL,'$verstoesse_id','$begegnung_id','$team_id','$aussteller_id','$ausstelldatum','$multiplikator','$weitere_angaben','$status');"; . "\n (ordnungsstrafen_id,verstoesse_id,begegnung_id,team_id,aussteller_id,ausstelldatum,multiplikator,weitere_angaben)"
else { . "\n VALUES (NULL,'$verstoesse_id','$begegnung_id','$team_id','$aussteller_id','$ausstelldatum','$multiplikator','$weitere_angaben');";
$query = "UPDATE #__sportsmanager_ordnungsstrafen" } else {
. "\n SET verstoesse_id = '$verstoesse_id'," $query = "UPDATE #__sportsmanager_ordnungsstrafen"
. "\n begegnung_id = '$begegnung_id'," . "\n SET verstoesse_id = '$verstoesse_id',"
. "\n team_id = '$team_id'," . "\n begegnung_id = '$begegnung_id',"
. "\n aussteller_id = '$aussteller_id'," . "\n team_id = '$team_id',"
. "\n ausstelldatum = '$ausstelldatum'," . "\n aussteller_id = '$aussteller_id',"
. "\n multiplikator = '$multiplikator'," . "\n ausstelldatum = '$ausstelldatum',"
. "\n weitere_angaben = '$weitere_angaben'," . "\n multiplikator = '$multiplikator',"
. "\n status = '$status'" . "\n weitere_angaben = '$weitere_angaben'"
. "\n WHERE ordnungsstrafen_id = $id"; . "\n WHERE ordnungsstrafen_id = $id;";
} }
$db->setQuery($query); $db->setQuery($query);
if (!$db->execute()) { if (!$db->execute()) {
die($db->stderr(true)); die($db->stderr(true));
} }
redirectSportsManagerURL('&task=admin_ordnungsstrafen&filter_saison_id='.$filter_saison_id);
}
redirectSportsManagerURL('&task=admin_ordnungsstrafen'); if ($jInput->get('set_versender', '', 'RAW') == 'set') {
echo "Set Versender";
$query = "UPDATE #__sportsmanager_ordnungsstrafen"
. "\n SET versender_id = '$user_id',"
. "\n versendedatum = CURTIME()"
. "\n WHERE ordnungsstrafen_id = $id;";
}
if ($jInput->get('set_versender', '', 'RAW') == 'reset') {
$query = "UPDATE #__sportsmanager_ordnungsstrafen"
. "\n SET versender_id = NULL,"
. "\n versendedatum = NULL,"
. "\n rechnungssteller_id = NULL,"
. "\n rechnungsdatum = NULL"
. "\n WHERE ordnungsstrafen_id = $id;";
}
if ($jInput->get('set_rechnung', '', 'RAW') == 'set') {
echo "Set Versender";
$query = "UPDATE #__sportsmanager_ordnungsstrafen"
. "\n SET rechnungssteller_id = '$user_id',"
. "\n rechnungsdatum = CURTIME()"
. "\n WHERE ordnungsstrafen_id = $id;";
}
if ($jInput->get('set_rechnung', '', 'RAW') == 'reset') {
$query = "UPDATE #__sportsmanager_ordnungsstrafen"
. "\n SET rechnungssteller_id = NULL,"
. "\n rechnungsdatum = NULL"
. "\n WHERE ordnungsstrafen_id = $id;";
}
$db->setQuery($query);
if (!$db->execute()) {
die($db->stderr(true));
}
redirectSportsManagerURL('&task=admin_ordnungsstrafe_edit&id='.$id);
} }
#[NoReturn] function adminRemoveOrdnungsstrafe(): void #[NoReturn] function adminRemoveOrdnungsstrafe(): void
@@ -6425,9 +6537,11 @@ function adminEditOrdnungsstrafe(): void
keinZugriff(true); keinZugriff(true);
$query = "SELECT t1.ordnungsstrafen_id AS ID, t3.begegnung_id AS Spiel_ID, t7.bezeichnung AS Liga," $query = "SELECT t1.ordnungsstrafen_id AS ID, t3.begegnung_id AS Spiel_ID, t7.bezeichnung AS Liga,"
. "\n t3.spieltag AS Spieltag, t9.vereinsname AS Verein, t2.verstoss AS Verstoss, t8.name AS Aussteller," . "\n t3.spieltag AS Spieltag, t9.vereinsname AS Verein, t2.verstoss AS Verstoss,"
. "\n (t1.multiplikator * t2.gebuehr + t2.zusatzgebuehr) AS Gebuehr," . "\n (t1.multiplikator * t2.gebuehr + t2.zusatzgebuehr) AS Gebuehr,"
. "\n t1.ausstelldatum AS Ausstelldatum, t1.status AS Status" . "\n t8.name AS Aussteller, t1.ausstelldatum AS Ausstelldatum,"
. "\n t10.name AS Versender, t1.versendedatum AS Versendedatum,"
. "\n t11.name AS Rechnung, t1.rechnungsdatum AS Rechnungsdatum"
. "\n FROM #__sportsmanager_ordnungsstrafen AS t1" . "\n FROM #__sportsmanager_ordnungsstrafen AS t1"
. "\n LEFT JOIN #__sportsmanager_verstoesse AS t2 ON t1.verstoesse_id = t2.verstoesse_id" . "\n LEFT JOIN #__sportsmanager_verstoesse AS t2 ON t1.verstoesse_id = t2.verstoesse_id"
. "\n LEFT JOIN #__sportsmanager_begegnung AS t3 ON t1.begegnung_id = t3.begegnung_id" . "\n LEFT JOIN #__sportsmanager_begegnung AS t3 ON t1.begegnung_id = t3.begegnung_id"
@@ -6437,6 +6551,8 @@ function adminEditOrdnungsstrafe(): void
. "\n LEFT JOIN #__sportsmanager_team AS t6 ON t3.gast_team_id = t6.team_id" . "\n LEFT JOIN #__sportsmanager_team AS t6 ON t3.gast_team_id = t6.team_id"
. "\n LEFT JOIN #__sportsmanager_veranstaltung AS t7 ON t4.veranstaltung_id = t7.veranstaltung_id" . "\n LEFT JOIN #__sportsmanager_veranstaltung AS t7 ON t4.veranstaltung_id = t7.veranstaltung_id"
. "\n LEFT JOIN #__users AS t8 ON t1.aussteller_id = t8.id" . "\n LEFT JOIN #__users AS t8 ON t1.aussteller_id = t8.id"
. "\n LEFT JOIN #__users AS t10 ON t1.versender_id = t10.id"
. "\n LEFT JOIN #__users AS t11 ON t1.rechnungssteller_id = t11.id"
. "\n WHERE t7.saison_id = '" . $filter['saison'] . "'"; . "\n WHERE t7.saison_id = '" . $filter['saison'] . "'";
if (!empty($filter['verein'])) if (!empty($filter['verein']))
$query .= "\n AND t9.verein_id = '" . $filter['verein'] . "'"; $query .= "\n AND t9.verein_id = '" . $filter['verein'] . "'";
@@ -5447,10 +5447,13 @@ function updateDatabase(): void
. "\n `begegnung_id` int(11) NOT NULL DEFAULT 0," . "\n `begegnung_id` int(11) NOT NULL DEFAULT 0,"
. "\n `team_id` int(11) NOT NULL DEFAULT 0," . "\n `team_id` int(11) NOT NULL DEFAULT 0,"
. "\n `aussteller_id` int(11) NOT NULL DEFAULT 0," . "\n `aussteller_id` int(11) NOT NULL DEFAULT 0,"
. "\n `ausstelldatum` date NOT NULL DEFAULT current_timestamp()," . "\n `ausstelldatum` datetime NOT NULL DEFAULT current_timestamp(),"
. "\n `versender_id` int(11) DEFAULT NULL,"
. "\n `versendedatum` datetime DEFAULT NULL,"
. "\n `rechnungssteller_id` int(11) DEFAULT NULL,"
. "\n `rechnungsdatum` datetime DEFAULT NULL,"
. "\n `multiplikator` tinyint(1) NOT NULL DEFAULT 1," . "\n `multiplikator` tinyint(1) NOT NULL DEFAULT 1,"
. "\n `weitere_angaben` text NOT NULL DEFAULT ''," . "\n `weitere_angaben` text NOT NULL DEFAULT ''"
. "\n `status` varchar(16) NOT NULL DEFAULT '',"
. "\n PRIMARY KEY (`ordnungsstrafen_id`)" . "\n PRIMARY KEY (`ordnungsstrafen_id`)"
. "\n ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"; . "\n ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";
$db->setQuery( $query ); $db->setQuery( $query );
@@ -350,6 +350,9 @@ if ($task == "spielerbild") {
case 'admin_rechnung_remove': case 'admin_rechnung_remove':
adminRemoveRechnung(); adminRemoveRechnung();
break; break;
case 'admin_joomla_mail_senden':
sendJoomlaMail();
break;
case 'admin_regelwerke': case 'admin_regelwerke':
adminRegelwerke(); adminRegelwerke();
break; break;
@@ -6771,7 +6771,7 @@ class HTML_sportsmanager_admin
<?php <?php
} }
static function adminMailto($to,$cc,$bcc,$subject,$message,$back){ static function adminMailto($to,$cc,$bcc,$subject,$message,$backtomail,$backtosender,$vorlage=''){
global $params; global $params;
?> ?>
<div class="componentheading<?php echo $params->get('pageclass_sfx'); ?>"><?php echo Text::_('COM_SPORTSMANAGER_EMAIL_SEND'); ?></div> <div class="componentheading<?php echo $params->get('pageclass_sfx'); ?>"><?php echo Text::_('COM_SPORTSMANAGER_EMAIL_SEND'); ?></div>
@@ -6820,9 +6820,17 @@ class HTML_sportsmanager_admin
</td> </td>
</tr> </tr>
</table> </table>
<button type="button" onclick="sendMail()">E-Mail senden</button> <button type="button" onclick="sendMail()"><?php echo Text::_('COM_SPORTSMANAGER_EMAIL_SEND'); ?>&nbsp;(mailto)</button>
<input type="submit" name="cancel" value="<?php echo Text::_('COM_SPORTSMANAGER_BACK'); ?>" class="button"/> <input type="submit" name="joomlamail" value="<?php echo Text::_('COM_SPORTSMANAGER_EMAIL_SEND'); ?>&nbsp;(joomla)" class="button"/>
<input type="hidden" name="task" value="<?php echo $back; ?>"/> <?php if ($vorlage->name == "Ordnungsstrafe"){ ?>
<input type="submit" name="cancel" value="<?php echo Text::_('COM_SPORTSMANAGER_EDIT_DISCIPLINARY_FINE'); ?>" class="button"
onclick="const t = this.form.task; t.value = 'admin_ordnungsstrafe_edit';"/>
<input type="hidden" name="id" value="<?php echo $vorlage->id; ?>"/>
<?php } ?>
<input type="submit" name="cancel" value="<?php echo Text::_('COM_SPORTSMANAGER_BACK'); ?>" class="button"
onclick="const t = this.form.task; t.value = '<?php echo $backtosender; ?>';"/>
<input type="hidden" name="task" value="admin_joomla_mail_senden"/>
<input type="hidden" name="back" value="<?php echo $backtomail; ?>"/>
</div> </div>
</form> </form>
@@ -6967,8 +6975,8 @@ class HTML_sportsmanager_admin
<th nowrap><strong>Match</strong></th> <th nowrap><strong>Match</strong></th>
<th style='text-align: left;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_TEAM'); ?></strong></th> <th style='text-align: left;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_TEAM'); ?></strong></th>
<th style='text-align: left;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_VIOLATION'); ?></strong></th> <th style='text-align: left;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_VIOLATION'); ?></strong></th>
<th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_ISSUER'); ?></strong></th>
<th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_FEE'); ?></strong></th> <th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_FEE'); ?></strong></th>
<th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_ISSUER'); ?></strong></th>
<th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_DATE'); ?></strong></th> <th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_DATE'); ?></strong></th>
<th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_status'); ?></strong></th> <th style='text-align: center;' nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_status'); ?></strong></th>
<?php if (benutzerZugriff("benutzerVeranstalterModerator")){ ?> <?php if (benutzerZugriff("benutzerVeranstalterModerator")){ ?>
@@ -6990,9 +6998,9 @@ class HTML_sportsmanager_admin
<td nowrap style='text-align: center;' title='<?php echo $row->begegnung; ?>'><?php echo $row->begegnung_id; ?></td> <td nowrap style='text-align: center;' title='<?php echo $row->begegnung; ?>'><?php echo $row->begegnung_id; ?></td>
<td nowrap><?php echo $row->teamname; ?></td> <td nowrap><?php echo $row->teamname; ?></td>
<td><?php echo $row->verstoss; ?></td> <td><?php echo $row->verstoss; ?></td>
<td style='text-align: center;'><?php echo $row->name; ?></td>
<td nowrap style='text-align: center;'><?php echo $row->gebuehr; ?></td> <td nowrap style='text-align: center;'><?php echo $row->gebuehr; ?></td>
<td nowrap style='text-align: center;'><?php echo $row->ausstelldatum; ?></td> <td style='text-align: center;'><?php echo $row->name; ?></td>
<td nowrap style='text-align: center;'><?php echo date('d.m.Y', strtotime($row->ausstelldatum)); ?></td>
<td nowrap style='text-align: center;'><?php echo $row->status; ?></td> <td nowrap style='text-align: center;'><?php echo $row->status; ?></td>
<td nowrap><small><a <td nowrap><small><a
href="<?php echo SportsManagerURL('&task=admin_ordnungsstrafe_remove&id=' . $row->ordnungsstrafen_id); ?>" href="<?php echo SportsManagerURL('&task=admin_ordnungsstrafe_remove&id=' . $row->ordnungsstrafen_id); ?>"
@@ -7017,7 +7025,6 @@ class HTML_sportsmanager_admin
static function adminEditOrdnungsstrafe($row,$begegnung,$teams,$verstoesse,$aussteller): void static function adminEditOrdnungsstrafe($row,$begegnung,$teams,$verstoesse,$aussteller): void
{ {
global $params; global $params;
$stati = ["ausgestellt", "versendet", "Rechnung erstellt"];
?> ?>
<div <div
class="componentheading<?php echo $params->get('pageclass_sfx'); ?>"><?php echo Text::_('COM_SPORTSMANAGER_DISCIPLINARY_FINE'); ?> class="componentheading<?php echo $params->get('pageclass_sfx'); ?>"><?php echo Text::_('COM_SPORTSMANAGER_DISCIPLINARY_FINE'); ?>
@@ -7035,7 +7042,7 @@ class HTML_sportsmanager_admin
</td> </td>
<td nowrap> <td nowrap>
<input class="uk-select uk-form-width-large" type="text" name="begegnung" <input class="uk-select uk-form-width-large" type="text" name="begegnung"
id="match" size="50" style='height: 34px;' readonly id="match" size="50" style='height: 34px; width: 700px;' readonly
value="<?php echo $begegnung->begegnung; ?>"/> value="<?php echo $begegnung->begegnung; ?>"/>
<input class="uk-select uk-form-width-small" type="text" name="begegnung_id" id="match_id" <input class="uk-select uk-form-width-small" type="text" name="begegnung_id" id="match_id"
style='height: 34px; display: none;' readonly style='height: 34px; display: none;' readonly
@@ -7049,7 +7056,7 @@ class HTML_sportsmanager_admin
</td> </td>
<td nowrap> <td nowrap>
<select class="uk-select uk-form-width-large" name="verstoesse_id" id="violation" <select class="uk-select uk-form-width-large" name="verstoesse_id" id="violation"
size="1"> size="1" style='width: 700px;'>
<option value="0"><?php echo Text::_('COM_SPORTSMANAGER_NO_SELECT'); ?></option> <option value="0"><?php echo Text::_('COM_SPORTSMANAGER_NO_SELECT'); ?></option>
<?php <?php
foreach ($verstoesse as $verstoss) { foreach ($verstoesse as $verstoss) {
@@ -7082,25 +7089,63 @@ class HTML_sportsmanager_admin
</td> </td>
<td nowrap> <td nowrap>
<input class="uk-select uk-form-width-medium" type="text" name="aussteller" <input class="uk-select uk-form-width-medium" type="text" name="aussteller"
id="issuer" size="1" style='height: 34px; width: 300px;' readonly id="issuer" size="1" style='height: 34px; width: 200px;' readonly
value="<?php echo $aussteller->name; ?>"/> value="<?php echo (empty($row->aussteller_id) ? $aussteller->name : $row->aussteller); ?>"/>
<input class="uk-select uk-form-width-small" type="text" name="aussteller_id" id="issuer_id" <input class="uk-select uk-form-width-small" type="text" name="aussteller_id" id="issuer_id"
style='height: 34px; display: none;' size="1" readonly style='height: 34px; display: none;' size="1" readonly
value="<?php echo $aussteller->id; ?>"/> value="<?php echo (empty($row->aussteller_id) ? $aussteller->id : $row->aussteller_id); ?>"/>
<input class="uk-select uk-form-width-medium" type="text" name="ausstelldatum" id="issuedate"
size="1" style='height: 34px; width: 200px;' readonly
value="<?php echo (empty($row->ausstelldatum) ? date('Y-m-d h:m:s') : $row->ausstelldatum); ?>"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td nowrap style="width: 20%; text-align: right"> <td nowrap style="width: 20%; text-align: right">
<label <label
for="issuedate"><?php echo Text::_('COM_SPORTSMANAGER_ISSUE_DATE'); ?> for="sender"><?php echo Text::_('COM_SPORTSMANAGER_SENDER'); ?>
:</label> :</label>
</td> </td>
<td nowrap> <td nowrap>
<input class="uk-select uk-form-width-medium" type="text" name="ausstelldatum" id="issuedate" <input class="uk-select uk-form-width-medium" type="text" name="versender"
size="1" style='height: 34px; width: 300px;' title='Format YYYY-mm-dd' readonly id="sender" size="1" style='height: 34px; width: 200px;' readonly
value="<?php echo (empty($row->ausstelldatum) ? date('Y-m-d') : $row->ausstelldatum); ?>"/> value="<?php echo $row->versender; ?>"/>
<input class="uk-select uk-form-width-small" type="text" name="versender_id" id="sender_id"
style='height: 34px; display: none;' size="1" readonly
value="<?php echo $row->versender_id; ?>"/>
<input class="uk-select uk-form-width-medium" type="text" name="versendedatum" id="senderdate"
size="1" style='height: 34px; width: 200px;' readonly
value="<?php echo (empty($row->versendedatum) ? '' : $row->versendedatum); ?>"/>
<?php if ($row != null){ ?>
<input type="submit" name="set_versender"
value="<?php echo (empty($row->versendedatum) ? 'set' : 'reset'); ?>" class="button"/>
<?php } ?>
</td> </td>
</tr> </tr>
<tr>
<td nowrap style="width: 20%; text-align: right">
<label
for="billissuer"><?php echo Text::_('COM_SPORTSMANAGER_BILL_ISSUER'); ?>
:</label>
</td>
<td nowrap>
<input class="uk-select uk-form-width-medium" type="text" name="rechnungssteller"
id="billissuer" size="1" style='height: 34px; width: 200px;' readonly
value="<?php echo $row->rechnungssteller; ?>"/>
<input class="uk-select uk-form-width-small" type="text" name="rechnungssteller_id" id="billissuer_id"
style='height: 34px; display: none;' size="1" readonly
value="<?php echo $row->rechnungssteller_id; ?>"/>
<input class="uk-select uk-form-width-medium" type="text" name="rechnungsdatum" id="billissuedate"
size="1" style='height: 34px; width: 200px;' readonly
value="<?php echo (empty($row->rechnungsdatum) ? '' : $row->rechnungsdatum); ?>"/>
<?php if ($row != null && !empty($row->versendedatum)){ ?>
<input type="submit" name="set_rechnung"
value="<?php echo (empty($row->rechnungsdatum) ? 'set' : 'reset'); ?>" class="button"/>
<?php } ?>
</td>
</tr>
<tr> <tr>
<td nowrap style="width: 20%; text-align: right"> <td nowrap style="width: 20%; text-align: right">
<label for="multiplier"><?php echo Text::_('COM_SPORTSMANAGER_MULTIPLIER'); ?> <label for="multiplier"><?php echo Text::_('COM_SPORTSMANAGER_MULTIPLIER'); ?>
@@ -7127,29 +7172,19 @@ class HTML_sportsmanager_admin
rows="8"><?php if ($row != null) echo htmlentities_utf8($row->weitere_angaben); ?></textarea> rows="8"><?php if ($row != null) echo htmlentities_utf8($row->weitere_angaben); ?></textarea>
</td> </td>
</tr> </tr>
<tr>
<td nowrap style="width: 20%; text-align: right">
<label for="state"><?php echo Text::_('COM_SPORTSMANAGER_STATUS'); ?>
:</label>
</td>
<td nowrap>
<select class="uk-select uk-form-width-small" name="status" id="state"
size="1" style='height: 34px; width: 300px;'>
<?php
foreach ($stati as $status) {
echo "<option value=\"" . $status . "\"" . ($row != null ? ($row->status == $status ? "selected" : "") : "") . ">" . htmlentities_utf8($status) . "</option>";
}
?>
</select>
</td>
</tr>
</table> </table>
</div> </div>
<input type="submit" name="save" value="<?php echo Text::_('COM_SPORTSMANAGER_SAVE'); ?>" class="button"/> <input type="submit" name="save" value="<?php echo Text::_('COM_SPORTSMANAGER_SAVE'); ?>" class="button"/>
<?php if ($row != null && benutzerZugriff("benutzerVeranstalterModerator")){ ?>
<input type="submit" name="cancel" value="<?php echo Text::_('COM_SPORTSMANAGER_SEND_DISCIPLINARY_FINE'); ?>" class="button"
onclick="const t = this.form.task; t.value = 'admin_ordnungsstrafe_mailen';"/>
<input type="hidden" name="id" value="<?php echo $row->ordnungsstrafen_id; ?>"/>
<?php } ?>
<input type="submit" name="cancel" value="<?php echo Text::_('COM_SPORTSMANAGER_CANCEL'); ?>" class="button"/> <input type="submit" name="cancel" value="<?php echo Text::_('COM_SPORTSMANAGER_CANCEL'); ?>" class="button"/>
<input type="hidden" name="task" value="admin_ordnungsstrafe_save"/> <input type="hidden" name="task" value="admin_ordnungsstrafe_save"/>
<input type="hidden" name="id" value="<?php echo($row != null ? $row->ordnungsstrafen_id : "0"); ?>"/> <input type="hidden" name="id" value="<?php echo($row != null ? $row->ordnungsstrafen_id : "0"); ?>"/>
<input type="hidden" name="filter_saison_id" value="<?php echo $begegnung->saison_id; ?>"/>
</form> </form>
<?php <?php
} }
@@ -1032,6 +1032,8 @@ COM_SPORTSMANAGER_ADD_RULEBOOK="Regelwerk hinzuf&uuml;gen"
COM_SPORTSMANAGER_DISCIPLINARY_FINES="Ordnungsstrafen" COM_SPORTSMANAGER_DISCIPLINARY_FINES="Ordnungsstrafen"
COM_SPORTSMANAGER_DISCIPLINARY_FINE="Ordnungsstrafe" COM_SPORTSMANAGER_DISCIPLINARY_FINE="Ordnungsstrafe"
COM_SPORTSMANAGER_ISSUE_DISCIPLINARY_FINES="Ordnungsstrafe ausstellen" COM_SPORTSMANAGER_ISSUE_DISCIPLINARY_FINES="Ordnungsstrafe ausstellen"
COM_SPORTSMANAGER_EDIT_DISCIPLINARY_FINE="Ordnungsstrafe bearbeiten"
COM_SPORTSMANAGER_SEND_DISCIPLINARY_FINE="Ordnungsstrafe versenden"
COM_SPORTSMANAGER_REALLY_REMOVE_DISCIPLINARY_FINES="Willst Du diese Ordnungsstrafe wirklich entfernen?" COM_SPORTSMANAGER_REALLY_REMOVE_DISCIPLINARY_FINES="Willst Du diese Ordnungsstrafe wirklich entfernen?"
COM_SPORTSMANAGER_VIOLATIONS="Verst&ouml;&szlig;e" COM_SPORTSMANAGER_VIOLATIONS="Verst&ouml;&szlig;e"
COM_SPORTSMANAGER_VIOLATION="Versto&szlig;" COM_SPORTSMANAGER_VIOLATION="Versto&szlig;"
@@ -1050,5 +1052,9 @@ COM_SPORTSMANAGER_EMAIL_SEND="E-Mail senden"
COM_SPORTSMANAGER_EMAIL_TEXT_TEMPLATE="Textvorlage" COM_SPORTSMANAGER_EMAIL_TEXT_TEMPLATE="Textvorlage"
COM_SPORTSMANAGER_ISSUER="Aussteller" COM_SPORTSMANAGER_ISSUER="Aussteller"
COM_SPORTSMANAGER_ISSUE_DATE="Ausstelldatum" COM_SPORTSMANAGER_ISSUE_DATE="Ausstelldatum"
COM_SPORTSMANAGER_SENDER="Sender"
COM_SPORTSMANAGER_BILL_ISSUER="Rechnung erstellt"
COM_SPORTSMANAGER_MULTIPLIER="Multiplikator" COM_SPORTSMANAGER_MULTIPLIER="Multiplikator"
COM_SPORTSMANAGER_ADDITIONAL_INFORMATION="Weitere Angaben" COM_SPORTSMANAGER_ADDITIONAL_INFORMATION="Weitere Angaben"
COM_SPORTSMANAGER_EMAIL_WAS_SEND="Die E-Mail wurde erfolgreich versendet"
COM_SPORTSMANAGER_EMAIL_WAS_NOT_SEND="Die E-Mail wurde nicht versendet"
@@ -1032,6 +1032,8 @@ COM_SPORTSMANAGER_ADD_RULEBOOK="Add rulebook"
COM_SPORTSMANAGER_DISCIPLINARY_FINES="Disciplinary fines" COM_SPORTSMANAGER_DISCIPLINARY_FINES="Disciplinary fines"
COM_SPORTSMANAGER_ISSUE_DISCIPLINARY_FINES="Issue disciplinary fines" COM_SPORTSMANAGER_ISSUE_DISCIPLINARY_FINES="Issue disciplinary fines"
COM_SPORTSMANAGER_ISSUE_DISCIPLINARY_FINE="Issue disciplinary fine" COM_SPORTSMANAGER_ISSUE_DISCIPLINARY_FINE="Issue disciplinary fine"
COM_SPORTSMANAGER_EDIT_DISCIPLINARY_FINE="Edit issue disciplinary fine"
COM_SPORTSMANAGER_SEND_DISCIPLINARY_FINE="Send issue disciplinary fine"
COM_SPORTSMANAGER_REALLY_REMOVE_DISCIPLINARY_FINES="Do you really want to remove this Issue disciplinary fine?" COM_SPORTSMANAGER_REALLY_REMOVE_DISCIPLINARY_FINES="Do you really want to remove this Issue disciplinary fine?"
COM_SPORTSMANAGER_VIOLATIONS="Violations" COM_SPORTSMANAGER_VIOLATIONS="Violations"
COM_SPORTSMANAGER_VIOLATION="Violation" COM_SPORTSMANAGER_VIOLATION="Violation"
@@ -1049,6 +1051,10 @@ COM_SPORTSMANAGER_EMAIL_TO="to"
COM_SPORTSMANAGER_EMAIL_SEND="Send E-Mail" COM_SPORTSMANAGER_EMAIL_SEND="Send E-Mail"
COM_SPORTSMANAGER_EMAIL_TEXT_TEMPLATE="Text template" COM_SPORTSMANAGER_EMAIL_TEXT_TEMPLATE="Text template"
COM_SPORTSMANAGER_ISSUER="Issuer" COM_SPORTSMANAGER_ISSUER="Issuer"
COM_SPORTSMANAGER_SENDER="Sender"
COM_SPORTSMANAGER_ISSUE_DATE="Issue date" COM_SPORTSMANAGER_ISSUE_DATE="Issue date"
COM_SPORTSMANAGER_BILL_ISSUER="Bill issuer"
COM_SPORTSMANAGER_MULTIPLIER="Multiplier" COM_SPORTSMANAGER_MULTIPLIER="Multiplier"
COM_SPORTSMANAGER_ADDITIONAL_INFORMATION="Additional information" COM_SPORTSMANAGER_ADDITIONAL_INFORMATION="Additional information"
COM_SPORTSMANAGER_EMAIL_WAS_SEND="E-Mail was succesfully sent"
COM_SPORTSMANAGER_EMAIL_WAS_NOT_SEND="E-Mail was not sent"
+6 -3
View File
@@ -1150,10 +1150,13 @@ return new class () implements InstallerScriptInterface
. "\n `begegnung_id` int(11) NOT NULL DEFAULT 0," . "\n `begegnung_id` int(11) NOT NULL DEFAULT 0,"
. "\n `team_id` int(11) NOT NULL DEFAULT 0," . "\n `team_id` int(11) NOT NULL DEFAULT 0,"
. "\n `aussteller_id` int(11) NOT NULL DEFAULT 0," . "\n `aussteller_id` int(11) NOT NULL DEFAULT 0,"
. "\n `ausstelldatum` date NOT NULL DEFAULT current_timestamp()," . "\n `ausstelldatum` datetime NOT NULL DEFAULT current_timestamp(),"
. "\n `versender_id` int(11) DEFAULT NULL,"
. "\n `versendedatum` datetime DEFAULT NULL,"
. "\n `rechnungssteller_id` int(11) DEFAULT NULL,"
. "\n `rechnungsdatum` datetime DEFAULT NULL,"
. "\n `multiplikator` tinyint(1) NOT NULL DEFAULT 1," . "\n `multiplikator` tinyint(1) NOT NULL DEFAULT 1,"
. "\n `weitere_angaben` text NOT NULL DEFAULT ''," . "\n `weitere_angaben` text NOT NULL DEFAULT ''"
. "\n `status` varchar(16) NOT NULL DEFAULT '',"
. "\n PRIMARY KEY (`ordnungsstrafen_id`)" . "\n PRIMARY KEY (`ordnungsstrafen_id`)"
. "\n ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"; . "\n ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";
$db->setQuery( $query ); $db->setQuery( $query );