first commit

This commit is contained in:
2024-11-17 19:56:17 +01:00
commit 81b1185f8e
6599 changed files with 832395 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace front\controls;
class Newsletter
{
public static function signin()
{
$result = [ 'status' => 'bad' ];
if ( \front\factory\Newsletter::newsletter_signin( \S::get( 'email' ) ) )
$result = [ 'status' => 'ok' ];
echo json_encode( $result );
exit;
}
public static function confirm()
{
global $lang;
if ( \front\factory\Newsletter::newsletter_confirm( \S::get( 'hash' ) ) )
\S::alert( $lang['email-zostal-dodany-do-listy-newsletter'] );
header( 'Location: /' );
exit;
}
public static function unsubscribe()
{
global $lang;
if ( \front\factory\Newsletter::newsletter_unsubscribe( \S::get( 'hash' ) ) )
\S::alert( $lang['email-zostal-usuniety-z-listy-newsletter'] );
header( 'Location: /' );
exit;
}
}