diff --git a/src/snippets/172_registration_maxlength.php b/src/snippets/172_registration_maxlength.php
new file mode 100644
index 0000000..000f32f
--- /dev/null
+++ b/src/snippets/172_registration_maxlength.php
@@ -0,0 +1,43 @@
+?>
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Bei Premium-Snipes werden dir deine FastCoins wieder gutgeschrieben.', 'Ja', 'Abbrechen', '_self');
+ }
+ }
+ if(page_id() === 978) { // inaktive-snipes
+ if (isset($_GET["d"])) {
+ $category = 'expired';
+ [$bool, $redirect] = db_delete_own_post_by_requestid_category($category, $_GET["d"]);
+ if ($redirect)
+ redirect($redirect);
+ else
+ redirect('.');
+ }
+ else {
+ show_button_container();
+ confirm_modal('#button-delete-appointment', 'id', 'Löschen', 'Termin wirklich löschen?
Bei Premium-Snipes werden dir deine FastCoins wieder gutgeschrieben.', 'Ja', 'Abbrechen', '_self');
+ }
+ }
+ if(page_id() === 965) { // meine-snipes
+ if (isset($_GET["d"])) {
+ $category = 'appointment';
+ db_delete_own_post_by_requestid_category($category, $_GET["d"]);
+ redirect('.');
+ }
+ else {
+ show_button_container();
+ confirm_modal('#button-delete-appointment', 'id', 'Löschen', 'Termin wirklich löschen?
Bei erfolgreichen Premium-Snipes werden keine FastCoins gutgeschrieben.', 'Ja', 'Abbrechen', '_self');
+ }
+ }
+ if(page_id() === 986) { // account
+ if (isset($_GET["d"])) {
+ php_console_log('deleting account...');
+ api_delete_account();
+ wp_logout();
+ }
+ else {
+ button_change_account();
+ //show_button_container();
+ confirm_modal('#button-delete-account', 'id', 'Account löschen', 'Account endgültig löschen?
Bitte beachte, dass alle deine Daten, sowie alle aktiven Suchen und erfolgreiche Snipes gelöscht werden.
FastCoins kannst du ggfs. vorher an Freunde senden, da sie sonst verloren gehen.
Rückerstattungen sind nicht möglich.', 'Ja', 'Abbrechen', '_self');
+ }
+ }
+}
+
+function button_change_account() {
+ ?>
+
+ $user->ID,
+ 'event' => 'restapi-delete-user',
+ );
+
+ // Create the context for the request
+ $context = stream_context_create(array(
+ 'http' => array(
+ 'method' => 'POST',
+ 'header' => "Content-Type: application/json\r\n",
+ 'content' => json_encode($postData)
+ )
+ ));
+
+ // Send the request
+ $response = file_get_contents('https://terminsnipe:y9aFwUO7htuyKMaaPQWu@service.berlin.de.zinomedia.de/www/src/terminsnipe_controller.pl', FALSE, $context);
+
+ // Check for errors
+ if($response === FALSE){
+ die('Error');
+ }
+
+ // Decode the response
+ $responseData = json_decode($response, TRUE);
+
+ // Print the date from the response
+ echo $responseData['published'];
+ dump_to_file('/var/www/lab/newfile.txt', $responseData);
+
+}
+
+function show_button_container() {
+ ?>
+
+ $request_id,
+ 'category' => $category,
+ );
+ $postslist = get_own_posts_by_tag_and_category($data);
+
+ if (!empty($postslist)) {
+ php_console_log('Post belongs to user');
+
+ // DELETE FROM DB
+ if ($category === 'requests') {
+ $table = 'request';
+ }
+ else if ($category === 'expired') {
+ $table = 'request';
+ }
+ else if ($category === 'appointment') {
+ $table = 'appointments';
+ }
+
+ $wpdb = connect_to_server('zinomedia');
+ $status = $wpdb->delete( $table, array( 'ID' => $_GET["d"] ) );
+
+ if ($category === 'requests' || $category === 'expired') {
+ [$bool, $redirect] = refund_coins($postslist, $user);
+ return [$bool, $redirect];
+ }
+ }
+ else if (empty($postslist)) {
+ php_console_log('Post does NOT belong to user');
+
+ return [0, null];
+ }
+}
+
+function refund_coins($postslist, $user) {
+ $postmeta = get_post_meta( $postslist[0]->ID );
+ if( $postmeta['is_premium'][0] ) {
+ $balance_before_refund = mycred_return_users_balance();
+ mycred_add( 'booking_manually_cancelled', $user->ID, $postmeta['price'][0], 'Cancellation by user, refund points' );
+ $redirect = 'http://zinomedia.de/terminsnipe/?uccr&price=' . $postmeta['price'][0] . '&bbr=' . $balance_before_refund;
+ return [1, $redirect];
+ }
+ else {
+ return [0, null];
+ }
+}
+
+function confirm_modal($button_id, $data_attribute, $title, $msg, $true, $false, $open) {
+ ?>
+
+ array(
+ 'relation' => 'AND',
+ array(
+ 'taxonomy' => 'post_tag',
+ 'field' => 'slug',
+ 'terms' => $data['tag1'],
+ 'include_children' => false
+ ),
+ array(
+ 'taxonomy' => 'post_tag',
+ 'field' => 'slug',
+ 'terms' => $user->user_nicename,
+ 'include_children' => false
+ ),
+ array(
+ 'taxonomy' => 'category',
+ 'field' => 'slug',
+ 'terms' => $data['category'],
+ ),
+ )
+ );
+ $postslist = get_posts( $args );
+
+ return $postslist;
+}
\ No newline at end of file
diff --git a/src/snippets/confetti.php b/src/snippets/confetti.php
new file mode 100644
index 0000000..755f847
--- /dev/null
+++ b/src/snippets/confetti.php
@@ -0,0 +1,20 @@
+?>
+
+
+
+
+
Klicke auf den unten stehenden Link, erstelle dein Passwort und werde Teil des Snipe-Hypes! Ab jetzt nie wieder Warteschleife am Bürgertelefon. Nie wieder außerhalb der Telefonzeiten. Nie wieder Chatbot Bobbi. Du bestimmst die Regeln, wir erledigen den Rest.
+Hier legst du ein Passwort fest: Jetzt Passwort erstellen
+Übrigens: FastCoins sind unsere smarte und sichere Bezahlmethode für Premium-Zeiträume. Hast du es nicht so eilig? Dann schnappe dir einen Free-Termin. Du bestimmst die Regeln, wir erledigen den Rest.
+ +