<?php
try {
    require('application/language/english/translations_lang.php');
    require('config.php');

    $firstnameonoff = nl2br(addslashes($_POST['first-name-onoff']));
    $firstnamerequired = nl2br(addslashes($_POST['first-name-required']));

    $lastnameonoff = nl2br(addslashes($_POST['last-name-onoff']));
    $lastnamerequired = nl2br(addslashes($_POST['last-name-required']));

    $birthdateonoff = nl2br(addslashes($_POST['birth-date-onoff']));
    $birthdaterequired = nl2br(addslashes($_POST['birth-date-required']));

    $emailonoff = nl2br(addslashes($_POST['email-onoff']));
    $emailrequired = nl2br(addslashes($_POST['email-required']));

    $phonenumberonoff = nl2br(addslashes($_POST['phone-number-onoff']));
    $phonenumberrequired = nl2br(addslashes($_POST['phone-number-required']));

    $addressonoff = nl2br(addslashes($_POST['address-onoff']));
    $addressrequired = nl2br(addslashes($_POST['address-required']));

    $cityonoff = nl2br(addslashes($_POST['city-onoff']));
    $cityrequired = nl2br(addslashes($_POST['city-required']));

    $zipcodeonoff = nl2br(addslashes($_POST['zip-code-onoff']));
    $zipcoderequired = nl2br(addslashes($_POST['zip-code-required']));

    $notesonoff = nl2br(addslashes($_POST['notes-onoff']));
    $notesrequired = nl2br(addslashes($_POST['notes-required']));


    $filename = "application/language/english/translations_lang.php";
    $millie = "<?php" . " " .

        "millie['page_title']  =" . "'" . $lang['page_title'] . "'" . ';' . " " .
        "millie['step_one_title'] =" . "'" . $lang['step_one_title'] . "'" . ';' . " " .
        "millie['select_service'] =" . "'" . $lang['select_service'] . "'" . ';' . " " .
        "millie['select_provider'] =" . "'" . $lang['select_provider'] . "'" . ';' . " " .
        "millie['duration'] =" . "'" . $lang['duration'] . "'" . ';' . " " .
        "millie['minutes'] =" . "'" . $lang['minutes'] . "'" . ';' . " " .
        "millie['price'] =" . "'" . $lang['price'] . "'" . ';' . " " .
        "millie['back'] =" . "'" . $lang['back'] . "'" . ';' . " " .
        "millie['step_two_title'] =" . "'" . $lang['step_two_title'] . "'" . ';' . " " .
        "millie['no_available_hours'] =" . "'" . $lang['no_available_hours'] . "'" . ';' . " " .
        "millie['appointment_hour_missing'] =" . "'" . $lang['appointment_hour_missing'] . "'" . ';' . " " .
        "millie['step_three_title'] =" . "'" . $lang['step_three_title'] . "'" . ';' . " " .
        "millie['first_name'] =" . "'" . $lang['first_name'] . "'" . ';' . " " .
        "millie['first_name_required'] =" . "'" . $firstnamerequired . "'" . ';' . " " .
        "millie['first_name_onoff'] =" . "'" . $firstnameonoff . "'" . ';' . " " .
        "millie['last_name'] =" . "'" . $lang['last_name'] . "'" . ';' . " " .
        "millie['last_name_required'] =" . "'" . $lastnamerequired . "'" . ';' . " " .
        "millie['last_name_onoff'] =" . "'" . $lastnameonoff . "'" . ';' . " " .
        "millie['birth_date'] =" . "'" . $lang['birth_date'] . "'" . ';' . " " .
        "millie['birth_date_required'] =" . "'" . $birthdaterequired . "'" . ';' . " " .
        "millie['birth_date_onoff'] =" . "'" . $birthdateonoff . "'" . ';' . " " .
        "millie['email'] =" . "'" . $lang['email'] . "'" . ';' . " " .
        "millie['email_required'] =" . "'" . $emailrequired . "'" . ';' . " " .
        "millie['email_onoff'] =" . "'" . $emailonoff . "'" . ';' . " " .
        "millie['phone_number'] =" . "'" . $lang['phone_number'] . "'" . ';' . " " .
        "millie['phone_number_required'] =" . "'" . $phonenumberrequired . "'" . ';' . " " .
        "millie['phone_number_onoff'] =" . "'" . $phonenumberonoff . "'" . ';' . " " .
        "millie['address'] =" . "'" . $lang['address'] . "'" . ';' . " " .
        "millie['address_required'] =" . "'" . $addressrequired . "'" . ';' . " " .
        "millie['address_onoff'] =" . "'" . $addressonoff . "'" . ';' . " " .
        "millie['city'] =" . "'" . $lang['city'] . "'" . ';' . " " .
        "millie['city_required'] =" . "'" . $cityrequired . "'" . ';' . " " .
        "millie['city_onoff'] =" . "'" . $cityonoff . "'" . ';' . " " .
        "millie['zip_code'] = " . "'" . $lang['zip_code'] . "'" . ';' . " " .
        "millie['zip_code_required'] = " . "'" . $zipcoderequired . "'" . ';' . " " .
        "millie['zip_code_onoff'] = " . "'" . $zipcodeonoff . "'" . ';' . " " .
        "millie['notes'] =" . "'" . $lang['notes'] . "'" . ';' . " " .
        "millie['notes_required'] =" . "'" . $notesrequired . "'" . ';' . " " .
        "millie['notes_onoff'] =" . "'" . $notesonoff . "'" . ';' . " " .
        "millie['fields_are_required'] =" . "'" . $lang['fields_are_required'] . "'" . ';' . " " .
        "millie['step_four_title'] =" . "'" . $lang['step_four_title'] . "'" . ';' . " " .
        "millie['confirm'] =" . "'" . $lang['confirm'] . "'" . ';' . " " .
        "millie['update'] =" . "'" . $lang['update'] . "'" . ';' . " " .
        "millie['cancel_appointment_hint'] =" . "'" . $lang['cancel_appointment_hint'] . "'" . ';' . " " .
        "millie['cancel'] =" . "'" . $lang['cancel'] . "'" . ';' . " " .
        "millie['appointment_registered'] =" . "'" . $lang['appointment_registered'] . "'" . ';' . " " .
        "millie['cancel_appointment_title'] =" . "'" . $lang['cancel_appointment_title'] . "'" . ';' . " " .
        "millie['appointment_cancelled'] =" . "'" . $lang['appointment_cancelled'] . "'" . ';' . " " .
        "millie['appointment_cancelled_title'] =" . "'" . $lang['appointment_cancelled_title'] . "'" . ";" .
        "millie['reason'] =" . "'" . $lang['reason'] . "'" . ';' . " " .
        "millie['appointment_removed_from_schedule'] =" . "'" . $lang['appointment_removed_from_schedule'] . "'" . ";" .
        "millie['appointment_details_was_sent_to_you'] =" . "'" . $lang['appointment_details_was_sent_to_you'] . "'" . ';' . " " .
        "millie['add_to_google_calendar'] =" . "'" . $lang['add_to_google_calendar'] . "'" . ';' . " " .
        "millie['appointment_booked'] =" . "'" . $lang['appointment_booked'] . "'" . ";" .
        "millie['thank_you_for_appointment'] =" . "'" . $lang['thank_you_for_appointment'] . "'" . ";" .
        "millie['appointment_details_title'] =" . "'" . $lang['appointment_details_title'] . "'" . ';' . " " .
        "millie['customer_details_title'] =" . "'" . $lang['customer_details_title'] . "'" . ';' . " " .
        "millie['service'] =" . "'" . $lang['service'] . "'" . ';' . " " .
        "millie['provider'] =" . "'" . $lang['provider'] . "'" . ';' . " " .
        "millie['customer'] =" . "'" . $lang['customer'] . "'" . ';' . " " .
        "millie['start'] =" . "'" . $lang['start'] . "'" . ';' . " " .
        "millie['end'] =" . "'" . $lang['end'] . "'" . ';' . " " .
        "millie['name'] =" . "'" . $lang['name'] . "'" . ';' . " " .
        "millie['phone'] =" . "'" . $lang['phone'] . "'" . ';' . " " .
        "millie['address'] =" . "'" . $lang['address'] . "'" . ';' . " " .
        "millie['appointment_link_title'] =" . "'" . $lang['appointment_link_title'] . "'" . ';' . " " .
        "millie['success'] =" . "'" . $lang['success'] . "'" . ';' . " " .
        "millie['appointment_added_to_google_calendar'] =" . "'" . $lang['appointment_added_to_google_calendar'] . "'" . ';' . " " .
        "millie['view_appointment_in_google_calendar'] =" . "'" . $lang['view_appointment_in_google_calendar'] . "'" . ';' . " " .
        "millie['appointment_added_to_your_plan'] =" . "'" . $lang['appointment_added_to_your_plan'] . "'" . ";" .
        "millie['appointment_link_description'] =" . "'" . $lang['appointment_link_description'] . "'" . ';' . " " .
        "millie['appointment_not_found'] =" . "'" . $lang['appointment_not_found'] . "'" . ';' . " " .
        "millie['appointment_does_not_exist_in_db'] =" . "'" . $lang['appointment_does_not_exist_in_db'] . "'" . ';' . " " .
        "millie['display_calendar'] =" . "'" . $lang['display_calendar'] . "'" . ';' . " " .
        "millie['calendar'] =" . "'" . $lang['calendar'] . "'" . ';' . " " .
        "millie['users'] =" . "'" . $lang['users'] . "'" . ';' . " " .
        "millie['settings'] =" . "'" . $lang['settings'] . "'" . ';' . " " .
        "millie['log_out'] =" . "'" . $lang['log_out'] . "'" . ';' . " " .
        "millie['synchronize'] =" . "'" . $lang['synchronize'] . "'" . ';' . " " .
        "millie['enable_sync'] =" . "'" . $lang['enable_sync'] . "'" . ';' . " " .
        "millie['disable_sync'] =" . "'" . $lang['disable_sync'] . "'" . ';' . " " .
        "millie['reload'] =" . "'" . $lang['reload'] . "'" . ';' . " " .
        "millie['appointment'] =" . "'" . $lang['appointment'] . "'" . ';' . " " .
        "millie['unavailable'] =" . "'" . $lang['unavailable'] . "'" . ';' . " " .
        "millie['week'] =" . "'" . $lang['week'] . "'" . ';' . " " .
        "millie['month'] =" . "'" . $lang['month'] . "'" . ';' . " " .
        "millie['today'] =" . "'" . $lang['today'] . "'" . ';' . " " .
        "millie['not_working'] =" . "'" . $lang['not_working'] . "'" . ';' . " " .
        "millie['break'] =" . "'" . $lang['break'] . "'" . ';' . " " .
        "millie['add'] =" . "'" . $lang['add'] . "'" . ';' . " " .
        "millie['edit'] =" . "'" . $lang['edit'] . "'" . ';' . " " .
        "millie['hello'] =" . "'" . $lang['hello'] . "'" . ';' . " " .
        "millie['all_day'] =" . "'" . $lang['all_day'] . "'" . ';' . " " .
        "millie['manage_appointment_record_hint'] =" . "'" . $lang['manage_appointment_record_hint'] . "'" . ';' . " " .
        "millie['select_filter_item_hint'] =" . "'" . $lang['select_filter_item_hint'] . "'" . ';' . " " .
        "millie['enable_appointment_sync_hint'] =" . "'" . $lang['enable_appointment_sync_hint'] . "'" . ';' . " " .
        "millie['manage_customers_hint'] =" . "'" . $lang['manage_customers_hint'] . "'" . ';' . " " .
        "millie['manage_services_hint'] =" . "'" . $lang['manage_services_hint'] . "'" . ';' . " " .
        "millie['manage_users_hint'] =" . "'" . $lang['manage_users_hint'] . "'" . ';' . " " .
        "millie['settings_hint'] =" . "'" . $lang['settings_hint'] . "'" . ';' . " " .
        "millie['log_out_hint'] =" . "'" . $lang['log_out_hint'] . "'" . ';' . " " .
        "millie['unavailable_periods_hint'] =" . "'" . $lang['unavailable_periods_hint'] . "'" . ';' . " " .
        "millie['new_appointment_hint'] =" . "'" . $lang['new_appointment_hint'] . "'" . ';' . " " .
        "millie['reload_appointments_hint'] =" . "'" . $lang['reload_appointments_hint'] . "'" . ';' . " " .
        "millie['trigger_google_sync_hint'] =" . "'" . $lang['trigger_google_sync_hint'] . "'" . ';' . " " .
        "millie['appointment_updated'] =" . "'" . $lang['appointment_updated'] . "'" . ';' . " " .
        "millie['undo'] =" . "'" . $lang['undo'] . "'" . ';' . " " .
        "millie['appointment_details_changed'] =" . "'" . $lang['appointment_details_changed'] . "'" . ";" .
        "millie['appointment_changes_saved'] =" . "'" . $lang['appointment_changes_saved'] . "'" . ";" .
        "millie['save'] =" . "'" . $lang['save'] . "'" . ';' . " " .
        "millie['new'] =" . "'" . $lang['new'] . "'" . ';' . " " .
        "millie['select'] =" . "'" . $lang['select'] . "'" . ';' . " " .
        "millie['hide'] =" . "'" . $lang['hide'] . "'" . ';' . " " .
        "millie['type_to_filter_customers'] =" . "'" . $lang['type_to_filter_customers'] . "'" . ';' . " " .
        "millie['clear_fields_add_existing_customer_hint'] =" . "'" . $lang['clear_fields_add_existing_customer_hint'] . "'" . ';' . " " .
        "millie['pick_existing_customer_hint'] =" . "'" . $lang['pick_existing_customer_hint'] . "'" . ';' . " " .
        "millie['new_appointment_title'] =" . "'" . $lang['new_appointment_title'] . "'" . ';' . " " .
        "millie['edit_appointment_title'] =" . "'" . $lang['edit_appointment_title'] . "'" . ';' . " " .
        "millie['delete_appointment_title'] =" . "'" . $lang['delete_appointment_title'] . "'" . ';' . " " .
        "millie['write_appointment_removal_reason'] =" . "'" . $lang['write_appointment_removal_reason'] . "'" . ';' . " " .
        "millie['appointment_saved'] =" . "'" . $lang['appointment_saved'] . "'" . ';' . " " .
        "millie['new_unavailable_title'] =" . "'" . $lang['new_unavailable_title'] . "'" . ';' . " " .
        "millie['edit_unavailable_title'] =" . "'" . $lang['edit_unavailable_title'] . "'" . ';' . " " .
        "millie['unavailable_saved'] =" . "'" . $lang['unavailable_saved'] . "'" . ';' . " " .
        "millie['start_date_before_end_error'] =" . "'" . $lang['start_date_before_end_error'] . "'" . ';' . " " .
        "millie['invalid_email'] =" . "'" . $lang['invalid_email'] . "'" . ';' . " " .
        "millie['customers'] =" . "'" . $lang['customers'] . "'" . ';' . " " .
        "millie['details'] =" . "'" . $lang['details'] . "'" . ';' . " " .
        "millie['no_records_found'] =" . "'" . $lang['no_records_found'] . "'" . ';' . " " .
        "millie['services'] =" . "'" . $lang['services'] . "'" . ';' . " " .
        "millie['duration_minutes'] =" . "'" . $lang['duration_minutes'] . "'" . ';' . " " .
        "millie['currency'] =" . "'" . $lang['currency'] . "'" . ';' . " " .
        "millie['category'] =" . "'" . $lang['category'] . "'" . ';' . " " .
        "millie['no_category'] =" . "'" . $lang['no_category'] . "'" . ';' . " " .
        "millie['description'] =" . "'" . $lang['description'] . "'" . ';' . " " .
        "millie['categories'] =" . "'" . $lang['categories'] . "'" . ';' . " " .
        "millie['admins'] =" . "'" . $lang['admins'] . "'" . ';' . " " .
        "millie['providers'] =" . "'" . $lang['providers'] . "'" . ';' . " " .
        "millie['secretaries'] =" . "'" . $lang['secretaries'] . "'" . ';' . " " .
        "millie['mobile_number'] =" . "'" . $lang['mobile_number'] . "'" . ';' . " " .
        "millie['state'] =" . "'" . $lang['state'] . "'" . ';' . " " .
        "millie['username'] =" . "'" . $lang['username'] . "'" . ';' . " " .
        "millie['password'] =" . "'" . $lang['password'] . "'" . ';' . " " .
        "millie['retype_password'] =" . "'" . $lang['retype_password'] . "'" . ';' . " " .
        "millie['receive_notifications'] =" . "'" . $lang['receive_notifications'] . "'" . ';' . " " .
        "millie['passwords_mismatch'] =" . "'" . $lang['passwords_mismatch'] . "'" . ';' . " " .
        "millie['admin_saved'] =" . "'" . $lang['admin_saved'] . "'" . ';' . " " .
        "millie['provider_saved'] =" . "'" . $lang['provider_saved'] . "'" . ';' . " " .
        "millie['secretary_saved'] =" . "'" . $lang['secretary_saved'] . "'" . ';' . " " .
        "millie['admin_deleted'] =" . "'" . $lang['admin_deleted'] . "'" . ';' . " " .
        "millie['provider_deleted'] =" . "'" . $lang['provider_deleted'] . "'" . ';' . " " .
        "millie['secretary_deleted'] =" . "'" . $lang['secretary_deleted'] . "'" . ';' . " " .
        "millie['service_saved'] =" . "'" . $lang['service_saved'] . "'" . ';' . " " .
        "millie['service_category_saved'] =" . "'" . $lang['service_category_saved'] . "'" . ';' . " " .
        "millie['service_deleted'] =" . "'" . $lang['service_deleted'] . "'" . ';' . " " .
        "millie['service_category_deleted'] =" . "'" . $lang['service_category_deleted'] . "'" . ';' . " " .
        "millie['customer_saved'] =" . "'" . $lang['customer_saved'] . "'" . ';' . " " .
        "millie['customer_deleted'] =" . "'" . $lang['customer_deleted'] . "'" . ';' . " " .
        "millie['current_view'] =" . "'" . $lang['current_view'] . "'" . ';' . " " .
        "millie['working_plan'] =" . "'" . $lang['working_plan'] . "'" . ';' . " " .
        "millie['reset_plan'] =" . "'" . $lang['reset_plan'] . "'" . ';' . " " .
        "millie['monday'] =" . "'" . $lang['monday'] . "'" . ';' . " " .
        "millie['tuesday'] =" . "'" . $lang['tuesday'] . "'" . ';' . " " .
        "millie['wednesday'] =" . "'" . $lang['wednesday'] . "'" . ';' . " " .
        "millie['thursday'] =" . "'" . $lang['thursday'] . "'" . ';' . " " .
        "millie['friday'] =" . "'" . $lang['friday'] . "'" . ';' . " " .
        "millie['saturday'] =" . "'" . $lang['saturday'] . "'" . ';' . " " .
        "millie['sunday'] =" . "'" . $lang['sunday'] . "'" . ';' . " " .
        "millie['breaks'] =" . "'" . $lang['breaks'] . "'" . ';' . " " .
        "millie['add_breaks_during_each_day'] =" . "'" . $lang['add_breaks_during_each_day'] . "'" . ';' . " " .
        "millie['day'] =" . "'" . $lang['day'] . "'" . ';' . " " .
        "millie['days'] =" . "'" . $lang['days'] . "'" . ';' . " " .
        "millie['actions'] =" . "'" . $lang['actions'] . "'" . ';' . " " .
        "millie['reset_working_plan_hint'] =" . "'" . $lang['reset_working_plan_hint'] . "'" . ';' . " " .
        "millie['company_name'] =" . "'" . $lang['company_name'] . "'" . ';' . " " .
        "millie['company_name_hint'] =" . "'" . $lang['company_name_hint'] . "'" . ';' . " " .
        "millie['company_email'] =" . "'" . $lang['company_email'] . "'" . ';' . " " .
        "millie['company_email_hint'] =" . "'" . $lang['company_email_hint'] . "'" . ';' . " " .
        "millie['company_link'] =" . "'" . $lang['company_link'] . "'" . ';' . " " .
        "millie['company_link_hint'] =" . "'" . $lang['company_link_hint'] . "'" . ';' . " " .
        "millie['go_to_booking_page'] =" . "'" . $lang['go_to_booking_page'] . "'" . ';' . " " .
        "millie['settings_saved'] =" . "'" . $lang['settings_saved'] . "'" . ';' . " " .
        "millie['general'] =" . "'" . $lang['general'] . "'" . ';' . " " .
        "millie['business_logic'] =" . "'" . $lang['business_logic'] . "'" . ';' . " " .
        "millie['current_user'] =" . "'" . $lang['current_user'] . "'" . ';' . " " .
        "millie['about_app'] =" . "'" . $lang['about_app'] . "'" . ';' . " " .
        "millie['edit_working_plan_hint'] =" . "'" . $lang['edit_working_plan_hint'] . "'" . ';' . " " .
        "millie['edit_breaks_hint'] =" . "'" . $lang['edit_breaks_hint'] . "'" . ';' . " " .
        "millie['book_advance_timeout'] =" . "'" . $lang['book_advance_timeout'] . "'" . ';' . " " .
        "millie['book_advance_timeout_hint'] =" . "'" . $lang['book_advance_timeout_hint'] . "'" . ';' . " " .
        "millie['timeout_minutes'] =" . "'" . $lang['timeout_minutes'] . "'" . ';' . " " .
        "millie['about_app_info'] =" . "'" . $lang['about_app_info'] . "'" . ';' . " " .
        "millie['current_version'] =" . "'" . $lang['current_version'] . "'" . ';' . " " .
        "millie['support'] =" . "'" . $lang['support'] . "'" . ';' . " " .
        "millie['about_app_support'] =" . "'" . $lang['about_app_support'] . "'" . ';' . " " .
        "millie['official_website'] =" . "'" . $lang['official_website'] . "'" . ';' . " " .
        "millie['google_plus_community'] =" . "'" . $lang['google_plus_community'] . "'" . ';' . " " .
        "millie['support_group'] =" . "'" . $lang['support_group'] . "'" . ';' . " " .
        "millie['project_issues'] =" . "'" . $lang['project_issues'] . "'" . ';' . " " .
        "millie['license'] =" . "'" . $lang['license'] . "'" . ';' . " " .
        "millie['about_app_license'] =" . "'" . $lang['about_app_license'] . "'" . ';' . " " .
        "millie['logout_success'] =" . "'" . $lang['logout_success'] . "'" . ';' . " " .
        "millie['book_appointment_title'] =" . "'" . $lang['book_appointment_title'] . "'" . ';' . " " .
        "millie['backend_section'] =" . "'" . $lang['backend_section'] . "'" . ';' . " " .
        "millie['you_need_to_login'] =" . "'" . $lang['you_need_to_login'] . "'" . ';' . " " .
        "millie['enter_username_here'] =" . "'" . $lang['enter_username_here'] . "'" . ';' . " " .
        "millie['enter_password_here'] =" . "'" . $lang['enter_password_here'] . "'" . ';' . " " .
        "millie['login'] =" . "'" . $lang['login'] . "'" . ';' . " " .
        "millie['forgot_your_password'] =" . "'" . $lang['forgot_your_password'] . "'" . ';' . " " .
        "millie['login_failed'] =" . "'" . $lang['login_failed'] . "'" . ';' . " " .
        "millie['type_username_and_email_for_new_password'] =" . "'" . $lang['type_username_and_email_for_new_password'] . "'" . ';' . " " .
        "millie['enter_email_here'] =" . "'" . $lang['enter_email_here'] . "'" . ';' . " " .
        "millie['regenerate_password'] =" . "'" . $lang['regenerate_password'] . "'" . ';' . " " .
        "millie['go_to_login'] =" . "'" . $lang['go_to_login'] . "'" . ';' . " " .
        "millie['new_password_sent_with_email'] =" . "'" . $lang['new_password_sent_with_email'] . "'" . ';' . " " .
        "millie['new_account_password'] =" . "'" . $lang['new_account_password'] . "'" . ';' . " " .
        "millie['new_password_is'] =" . "'" . $lang['new_password_is'] . "'" . ';' . " " .
        "millie['delete_record_prompt'] =" . "'" . $lang['delete_record_prompt'] . "'" . ';' . " " .
        "millie['delete_admin'] =" . "'" . $lang['delete_admin'] . "'" . ';' . " " .
        "millie['delete_customer'] =" . "'" . $lang['delete_customer'] . "'" . ';' . " " .
        "millie['delete_service'] =" . "'" . $lang['delete_service'] . "'" . ';' . " " .
        "millie['delete_category'] =" . "'" . $lang['delete_category'] . "'" . ';' . " " .
        "millie['delete_provider'] =" . "'" . $lang['delete_provider'] . "'" . ';' . " " .
        "millie['delete_secretary'] =" . "'" . $lang['delete_secretary'] . "'" . ';' . " " .
        "millie['delete_appointment'] =" . "'" . $lang['delete_appointment'] . "'" . ';' . " " .
        "millie['delete_unavailable'] =" . "'" . $lang['delete_unavailable'] . "'" . ';' . " " .
        "millie['delete'] =" . "'" . $lang['delete'] . "'" . ';' . " " .
        "millie['unexpected_issues'] =" . "'" . $lang['unexpected_issues'] . "'" . ';' . " " .
        "millie['unexpected_issues_message'] =" . "'" . $lang['unexpected_issues_message'] . "'" . ';' . " " .
        "millie['close'] =" . "'" . $lang['close'] . "'" . ';' . " " .
        "millie['page_not_found'] =" . "'" . $lang['page_not_found'] . "'" . ';' . " " .
        "millie['page_not_found_message'] =" . "'" . $lang['page_not_found_message'] . "'" . ';' . " " .
        "millie['error'] =" . "'" . $lang['error'] . "'" . ';' . " " .
        "millie['no_privileges'] =" . "'" . $lang['no_privileges'] . "'" . ';' . " " .
        "millie['no_privileges_message'] =" . "'" . $lang['no_privileges_message'] . "'" . ';' . " " .
        "millie['backend_calendar'] =" . "'" . $lang['backend_calendar'] . "'" . ';' . " " .
        "millie['start_date_time'] =" . "'" . $lang['start_date_time'] . "'" . ';' . " " .
        "millie['end_date_time'] =" . "'" . $lang['end_date_time'] . "'" . ';' . " " .
        "millie['licensed_under'] =" . "'" . $lang['licensed_under'] . "'" . ';' . " " .
        "millie['unexpected_issues_occurred'] =" . "'" . $lang['unexpected_issues_occurred'] . "'" . ';' . " " .
        "millie['service_communication_error'] =" . "'" . $lang['service_communication_error'] . "'" . ';' . " " .
        "millie['no_privileges_edit_appointments'] =" . "'" . $lang['no_privileges_edit_appointments'] . "'" . ';' . " " .
        "millie['unavailable_updated'] =" . "'" . $lang['unavailable_updated'] . "'" . ';' . " " .
        "millie['appointments'] =" . "'" . $lang['appointments'] . "'" . ';' . " " .
        "millie['unexpected_warnings'] =" . "'" . $lang['unexpected_warnings'] . "'" . ';' . " " .
        "millie['unexpected_warnings_message'] =" . "'" . $lang['unexpected_warnings_message'] . "'" . ';' . " " .
        "millie['filter'] =" . "'" . $lang['filter'] . "'" . ';' . " " .
        "millie['clear'] =" . "'" . $lang['clear'] . "'" . ';' . " " .
        "millie['uncategorized'] =" . "'" . $lang['uncategorized'] . "'" . ';' . " " .
        "millie['username_already_exists'] =" . "'" . $lang['username_already_exists'] . "'" . ';' . " " .
        "millie['password_length_notice'] =" . "'" . $lang['password_length_notice'] . "'" . ';' . " " .
        "millie['general_settings'] =" . "'" . $lang['general_settings'] . "'" . ';' . " " .
        "millie['personal_information'] =" . "'" . $lang['personal_information'] . "'" . ';' . " " .
        "millie['system_login'] =" . "'" . $lang['system_login'] . "'" . ';' . " " .
        "millie['user_settings_are_invalid'] =" . "'" . $lang['user_settings_are_invalid'] . "'" . ';' . " " .
        "millie['add_break'] =" . "'" . $lang['add_break'] . "'" . ';' . " " .
        "millie['january'] =" . "'" . $lang['january'] . "'" . ';' . " " .
        "millie['february'] =" . "'" . $lang['february'] . "'" . ';' . " " .
        "millie['march'] =" . "'" . $lang['march'] . "'" . ';' . " " .
        "millie['april'] =" . "'" . $lang['april'] . "'" . ';' . " " .
        "millie['may'] =" . "'" . $lang['may'] . "'" . ';' . " " .
        "millie['june'] =" . "'" . $lang['june'] . "'" . ';' . " " .
        "millie['july'] =" . "'" . $lang['july'] . "'" . ';' . " " .
        "millie['august'] =" . "'" . $lang['august'] . "'" . ';' . " " .
        "millie['september'] =" . "'" . $lang['september'] . "'" . ';' . " " .
        "millie['october'] =" . "'" . $lang['october'] . "'" . ';' . " " .
        "millie['november'] =" . "'" . $lang['november'] . "'" . ';' . " " .
        "millie['december'] =" . "'" . $lang['december'] . "'" . ';' . " " .
        "millie['previous'] =" . "'" . $lang['previous'] . "'" . ';' . " " .
        "millie['next'] =" . "'" . $lang['next'] . "'" . ';' . " " .
        "millie['now'] =" . "'" . $lang['now'] . "'" . ';' . " " .
        "millie['select_time'] =" . "'" . $lang['select_time'] . "'" . ';' . " " .
        "millie['time'] =" . "'" . $lang['time'] . "'" . ';' . " " .
        "millie['hour'] =" . "'" . $lang['hour'] . "'" . ';' . " " .
        "millie['minute'] =" . "'" . $lang['minute'] . "'" . ';' . " " .
        "millie['google_sync_completed'] =" . "'" . $lang['google_sync_completed'] . "'" . ';' . " " .
        "millie['google_sync_failed'] =" . "'" . $lang['google_sync_failed'] . "'" . ';' . " " .
        "millie['select_google_calendar'] =" . "'" . $lang['select_google_calendar'] . "'" . ';' . " " .
        "millie['select_google_calendar_prompt'] =" . "'" . $lang['select_google_calendar_prompt'] . "'" . ';' . " " .
        "millie['google_calendar_selected'] =" . "'" . $lang['google_calendar_selected'] . "'" . ';' . " " .
        "millie['oops_something_went_wrong'] =" . "'" . $lang['oops_something_went_wrong'] . "'" . ';' . " " .
        "millie['could_not_add_to_google_calendar'] =" . "'" . $lang['could_not_add_to_google_calendar'] . "'" . ';' . " " .
        "millie['ea_update_success'] =" . "'" . $lang['ea_update_success'] . "'" . ';' . " " .
        "millie['require_captcha'] =" . "'" . $lang['require_captcha'] . "'" . ';' . " " .
        "millie['require_captcha_hint'] =" . "'" . $lang['require_captcha_hint'] . "'" . ';' . " " .
        "millie['captcha_is_wrong'] =" . "'" . $lang['captcha_is_wrong'] . "'" . ';' . " " .
        "millie['any_provider'] =" . "'" . $lang['any_provider'] . "'" . ';' . " " .
        "millie['requested_hour_is_unavailable'] =" . "'" . $lang['requested_hour_is_unavailable'] . "'" . ';' . " " .
        "millie['customer_notifications'] =" . "'" . $lang['customer_notifications'] . "'" . ';' . " " .
        "millie['customer_notifications_hint'] =" . "'" . $lang['customer_notifications_hint'] . "'" . ';' . " " .
        "millie['date_format'] =" . "'" . $lang['date_format'] . "'" . ';' . " " .
        "millie['date_format_hint'] =" . "'" . $lang['date_format_hint'] . "'" . ';' . " " .
        "millie['time_format'] =" . "'" . $lang['time_format'] . "'" . ';' . " " .
        "millie['time_format_hint'] =" . "'" . $lang['time_format_hint'] . "'" . ';' . " " .
        "millie['google_analytics_code_hint'] =" . "'" . $lang['google_analytics_code_hint'] . "'" . ';' . " " .
        "millie['availabilities_type'] =" . "'" . $lang['availabilities_type'] . "'" . ';' . " " .
        "millie['flexible'] =" . "'" . $lang['flexible'] . "'" . ';' . " " .
        "millie['fixed'] =" . "'" . $lang['fixed'] . "'" . ';' . " " .
        "millie['attendants_number'] =" . "'" . $lang['attendants_number'] . "'" . ';' . " " .
        "millie['reset_working_plan'] =" . "'" . $lang['reset_working_plan'] . "'" . ';' . " " .
        "millie['legal_contents'] =" . "'" . $lang['legal_contents'] . "'" . ';' . " " .
        "millie['cookie_notice'] =" . "'" . $lang['cookie_notice'] . "'" . ';' . " " .
        "millie['display_cookie_notice'] =" . "'" . $lang['display_cookie_notice'] . "'" . ';' . " " .
        "millie['cookie_notice_content'] =" . "'" . $lang['cookie_notice_content'] . "'" . ';' . " " .
        "millie['terms_and_conditions'] =" . "'" . $lang['terms_and_conditions'] . "'" . ';' . " " .
        "millie['display_terms_and_conditions'] =" . "'" . $lang['display_terms_and_conditions'] . "'" . ';' . " " .
        "millie['terms_and_conditions_content'] =" . "'" . $lang['terms_and_conditions_content'] . "'" . ';' . " " .
        "millie['privacy_policy'] =" . "'" . $lang['privacy_policy'] . "'" . ';' . " " .
        "millie['display_privacy_policy'] =" . "'" . $lang['display_privacy_policy'] . "'" . ';' . " " .
        "millie['privacy_policy_content'] =" . "'" . $lang['privacy_policy_content'] . "'" . ';' . " " .
        "millie['website_using_cookies_to_ensure_best_experience'] =" . "'" . $lang['website_using_cookies_to_ensure_best_experience'] . "'" . ';' . " " .
        "millie['read_and_agree_to_terms_and_conditions'] =" . "'" . $lang['read_and_agree_to_terms_and_conditions'] . "'" . ';' . " " .
        "millie['read_and_agree_to_privacy_policy'] =" . "'" . $lang['read_and_agree_to_privacy_policy'] . "'" . ';' . " " .
        "millie['delete_personal_information_hint'] =" . "'" . $lang['delete_personal_information_hint'] . "'" . ';' . " " .
        "millie['delete_personal_information'] =" . "'" . $lang['delete_personal_information'] . "'" . ';' . " " .
        "millie['delete_personal_information_prompt'] =" . "'" . $lang['delete_personal_information_prompt'] . "'" . ';' . " " .
        "millie['smsdeletemessage'] =" . "'" . $lang['smsdeletemessage'] . "'" . ';' . " " .
        "millie['smsconfirmmessage'] =" . "'" . $lang['smsconfirmmessage'] . "'" . ';' .
        "millie['smsonoff'] =" . "'" . $lang['smsonoff'] . "'" . ';';

    $millie1 = str_replace('millie', '$lang', $millie);
    $millie2 = str_replace('|', '$', $millie1);
    file_put_contents($filename, $millie2);

    echo '<a href=' . '"' . Config::BASE_URL . '/index.php/backend/settings' . '"' . '>' . '<image src=' . '"' . 'leftarrow.png' . '"' . 'width=' . '"' . '100' . '"' . 'height=' . '"' . '50' . '"' . '>' . '</a>' . '<br>';

    echo 'SUCCESS, please close this tab and return to the main menu by clicking the black arrow!';
}catch(Exception $e) {
        echo 'Message: ' .$e->getMessage();
    }