| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 1 | <?php | 
 | 2 | // Service base url | 
 | 3 | $BASE_URL = "https://example.com/signup"; | 
 | 4 |  | 
| matheusfillipe | 47cf90b | 2021-05-13 03:36:21 -0300 | [diff] [blame] | 5 | // Language country code. The default language to look for. Leave empty for the default html folder | 
 | 6 | $LANG_CC = ""; | 
 | 7 |  | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 8 | // Ldap server | 
 | 9 | $HOST = 'localhost'; | 
 | 10 | $PORT = 389; | 
 | 11 | $USER = "admin"; | 
 | 12 | $PASSWORD = "myldappassword"; | 
 | 13 | $BASE_DN = 'cn={},ou=organization,dc=example,dc=com'; | 
| Marc Kupietz | 92e4866 | 2023-02-23 10:04:21 +0100 | [diff] [blame] | 14 | $ENCRYPT_PASSWORDS = false; | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 15 |  | 
| Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame^] | 16 | $DB = "mysql:host=127.0.0.1;dbname=signup"; | 
 | 17 | $DB_USER = "root"; | 
 | 18 | $DB_PASS = "mysqlpassword"; | 
 | 19 |  | 
| Marc Kupietz | 97afde4 | 2023-03-04 14:12:46 +0100 | [diff] [blame] | 20 | $SERVICE_ACRONYM = "Test Service"; | 
| Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame^] | 21 | $CONFERENCE_REGISTRATION = false; | 
| Marc Kupietz | f46948e | 2023-03-28 15:01:19 +0200 | [diff] [blame] | 22 |  | 
 | 23 | $SERVICE_URL = "https://www.example.org"; | 
| Marc Kupietz | 0be2b46 | 2023-03-08 09:29:11 +0100 | [diff] [blame] | 24 | $SERVICE_LOGO = "./static/Test_Logo.svg"; | 
 | 25 | $SERVICE_NAME = "International Test Corpus"; | 
 | 26 |  | 
 | 27 | $REGULAR_CONFERENCE_FEE = 280; | 
 | 28 | $EARLYBIRD_CONFERENCE_FEE = 240; | 
 | 29 | $CONFERENCE_DINNER = 60; | 
| Marc Kupietz | 7dabb46 | 2023-04-10 19:01:21 +0200 | [diff] [blame] | 30 | $MAX_DINNERS = 90; | 
| Marc Kupietz | 0be2b46 | 2023-03-08 09:29:11 +0100 | [diff] [blame] | 31 | $STUDENT_DISCOUNT = 80; | 
| Marc Kupietz | 8b80c7a | 2023-03-28 21:41:39 +0200 | [diff] [blame] | 32 | $EXCURSION = 20; | 
| Marc Kupietz | 0be2b46 | 2023-03-08 09:29:11 +0100 | [diff] [blame] | 33 | $EARLYBIRD_DEADLINE = "15 May 2023"; // HAWAIAN TIME (HST) is used :) | 
| Marc Kupietz | 9ab8c8f | 2023-02-23 12:14:33 +0100 | [diff] [blame] | 34 |  | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 35 | // Redis password | 
 | 36 | $REDIS_PASS = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | 
 | 37 |  | 
 | 38 | // Mail | 
 | 39 | $SMTP = (object)[ | 
 | 40 |         "from" => 'frommail@mail.com', | 
 | 41 |         'host' => 'tls://mail.com', | 
 | 42 |         'port' => '465', | 
 | 43 |         'username' => 'frommail@mail.com', | 
 | 44 |         'password' => 'xxxxxxxxx' | 
 | 45 | ]; | 
 | 46 | $FALLBACK_SMTP = (object)[ | 
 | 47 |         "from" => 'another@gmail.com', | 
 | 48 |         'host' => 'tls://gmail.com', | 
 | 49 |         'port' => '465', | 
 | 50 |         'username' => 'signup@gmail.com', | 
 | 51 |         'password' => 'xxxxxxxxxx' | 
 | 52 | ]; | 
| Marc Kupietz | 641b32a | 2023-03-04 19:55:56 +0100 | [diff] [blame] | 53 | // $MAIL_CC  = "ccme@example.org";  // optionally CC all mails | 
 | 54 | // $MAIL_BCC = "bccme@example.org"; // optionally BCC all mails | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 55 |  | 
 | 56 | // User Validation | 
 | 57 | $VAL_USER = (object)[ | 
 | 58 |         "min_username" => 5, | 
 | 59 |         "max_username" => 32, | 
 | 60 |         "min_first_name" => 3, | 
 | 61 |         "max_first_name" => 32, | 
 | 62 |         "min_last_name" => 3, | 
 | 63 |         "max_last_name" => 32, | 
 | 64 |         "min_password" => 8, | 
 | 65 |         "max_password" => 128 | 
 | 66 | ]; | 
 | 67 | $CAPTCHA_LENGTH = 5; | 
 | 68 |  | 
| matheusfillipe | 38706ea | 2021-05-12 02:45:42 -0300 | [diff] [blame] | 69 | // Use unsafe but easier captcha (no ocr testing) | 
 | 70 | $SIMPLECAPTCHA = false; | 
 | 71 |  | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 72 | // not accept emails from | 
 | 73 | $MAIL_HOST_BLACKLIST = ["mailinator.com"]; | 
 | 74 | // Use fallback_smtp directly for these hosts | 
 | 75 | $MAIL_HOST_DIRECT_FALLBACK = ["hotmail.com"]; | 
 | 76 |  | 
 | 77 | // Max registrations from one ip per hour | 
 | 78 | $HOURLY_REGISTRATIONS = 3; | 
 | 79 |  | 
 | 80 | // Max Captcha requests for one  ip per hour | 
 | 81 | $HOURLY_CAPTCHAS = 15; | 
 | 82 |  | 
 | 83 | // Expiration delay for mail confirmation in seconds. After this time the email | 
 | 84 | // confirmation link will say 'token expired' | 
 | 85 | $MAIL_CONFIRMATION_AWAIT_DELAY = 3600; | 
 | 86 |  | 
 | 87 | // CONFIRMATION EMAIL TEMPLATE | 
 | 88 | // text is the version for mail clients that don't support html | 
 | 89 | // html is the version with html support | 
| matheusfillipe | f43dd96 | 2021-05-13 23:27:01 -0300 | [diff] [blame] | 90 | // You can create templaets for different languages under | 
 | 91 | // templates_cc/email.php | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 92 | $MAIL_TEMPLATE = (object)[ | 
 | 93 |         "subject" => "Confirm your email",  | 
 | 94 |         "text" => "To complete your registration please paste this to your browser: {{url}}", | 
 | 95 |         "html" => "<html><body> | 
 | 96 |                 <h2>Almost there! Click on the link bellow to confirm your email address</h2> | 
 | 97 |                 <a href='{{url}}'>Confirm</a> | 
 | 98 |         </body></html>" | 
 | 99 | ]; | 
 | 100 |  | 
| Matheus Fillipe | 301684b | 2021-05-14 09:09:43 +0300 | [diff] [blame] | 101 | $RECOVERY_EMAIL_TEMPLATE = (object)[ | 
 | 102 |         "subject" => "Change your password!", | 
 | 103 |         "text"    => "Seems you requested a password change. If that wasn't you please ignore this message. Otherwise go to this url to change your password: {{url}}", | 
 | 104 |         "html"    => "<html><body> | 
 | 105 |                 <h3>Seems you requested a password change. If that wasn't you please ignore this message. Otherwise go to this url to change your password</h3> | 
 | 106 |                 <a href='{{url}}'>Click here</a> to change your password | 
 | 107 |         </body></html>" | 
 | 108 | ]; | 
 | 109 |  | 
 | 110 |  | 
 | 111 | $PASSWORD_CHANGED_EMAIL_TEMPLATE = (object)[ | 
 | 112 |         "subject" => "Your password was changed", | 
 | 113 |         "text"    => "Your password was chanegd successfully. If this wasn't you please contact support", | 
 | 114 |         "html"    => "<html><body> | 
 | 115 |                 <h3>Your password was chanegd successfully. If this wasn't you please contact support</h3> | 
 | 116 |         </body></html>" | 
 | 117 | ]; | 
 | 118 |  | 
| matheusfillipe | 38706ea | 2021-05-12 02:45:42 -0300 | [diff] [blame] | 119 | // url to redirect to after mail confirmation. It will be 5 seconds of delay. Leave empty to none | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 120 | $REDIRECT_TO = ""; | 
 | 121 |  | 
| Matheus Fillipe | 5ad0cd5 | 2022-05-05 06:10:41 +0300 | [diff] [blame] | 122 | // Registration callback. A function to run when registration is successfull | 
| Matheus Fillipe | 773eafa | 2022-05-05 06:15:47 +0300 | [diff] [blame] | 123 | $POST_REGISTER_HOOK = function($user){ | 
 | 124 |   echo "Welcome " . $user->name . "! Your ip is logged: " . $_SERVER['REMOTE_ADDR']; | 
| Matheus Fillipe | 5ad0cd5 | 2022-05-05 06:10:41 +0300 | [diff] [blame] | 125 | }; | 
 | 126 |  | 
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 127 | // displays php errors on the html page. Set to false for production | 
 | 128 | $DEBUG = false; |