1<?php 2 3use Fisharebest\Webtrees\I18N; 4 5?> 6 7<form method="post" autocomplete="off"> 8 <input name="lang" type="hidden" value="<?= e($lang) ?>"> 9 <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>"> 10 <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> 11 <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> 12 <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> 13 <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> 14 15 <h2> 16 <?= I18N::translate('Database connection') ?> – MySQL / MariaDB / Percona 17 </h2> 18 19 <?php foreach ($errors as $error) : ?> 20 <p class="alert alert-danger"><?= $error ?></p> 21 <?php endforeach ?> 22 23 <?php foreach ($warnings as $warning) : ?> 24 <p class="alert alert-warning"><?= $warning ?></p> 25 <?php endforeach ?> 26 27 <div class="row form-group"> 28 <label class="col-form-label col-sm-3" for="dbhost"> 29 <?= I18N::translate('Server name') ?> 30 </label> 31 32 <div class="col-sm-9"> 33 <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr"> 34 35 <p class="small text-muted"> 36 <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?> 37 </p> 38 39 <!-- 40 <p class="small text-muted"> 41 <?= I18N::translate('If you connect to the database using a UNIX socket, enter the path here and leave the port number empty.') ?> 42 </p> 43 --> 44 </div> 45 </div> 46 47 <div class="row form-group"> 48 <label class="col-form-label col-sm-3" for="dbport"> 49 <?= I18N::translate('Port number') ?> 50 </label> 51 52 <div class="col-sm-9"> 53 <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr"> 54 55 <p class="small text-muted"> 56 <?= I18N::translate('Most sites are configured to use the default value of 3306.') ?> 57 </p> 58 </div> 59 </div> 60 61 <div class="row form-group"> 62 <label class="col-form-label col-sm-3" for="dbuser"> 63 <?= I18N::translate('Database user account') ?> 64 </label> 65 66 <div class="col-sm-9"> 67 <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr"> 68 69 <p class="small text-muted"> 70 <?= I18N::translate('This is case sensitive.') ?> 71 </p> 72 </div> 73 </div> 74 75 <div class="row form-group"> 76 <label class="col-form-label col-sm-3" for="dbpass"> 77 <?= I18N::translate('Database password') ?> 78 </label> 79 80 <div class="col-sm-9"> 81 <input class="form-control" id="dbpass" name="dbpass" type="password" value="<?= e($dbpass) ?>" dir="ltr" autocomplete="off"> 82 83 <p class="small text-muted"> 84 <?= I18N::translate('This is case sensitive.') ?> 85 </p> 86 </div> 87 </div> 88 89 <div class="row form-group"> 90 <label class="col-form-label col-sm-3" for="dbname"> 91 <?= I18N::translate('Database name') ?> 92 </label> 93 94 <div class="col-sm-9"> 95 <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="[^`'"]{1,64}" type="text" value="<?= e($dbname) ?>"> 96 </div> 97 </div> 98 99 <div class="row form-group"> 100 <label class="col-form-label col-sm-3" for="tblpfx"> 101 <?= I18N::translate('Table prefix') ?> 102 </label> 103 <div class="col-sm-9"> 104 <input class="form-control" dir="ltr" id="tblpfx" maxlength="15" name="tblpfx" pattern="^[^`]*$" type="text" value="<?= e($tblpfx) ?>"> 105 <p class="small text-muted"> 106 <?= I18N::translate('The prefix is optional, but recommended. By giving the table names a unique prefix you can let several different applications share the same database.') ?> 107 <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?> 108 </p> 109 </div> 110 </div> 111 112 <hr> 113 114 <div class="d-flex justify-content-between"> 115 <button class="btn btn-primary" name="step" type="submit" value="5"> 116 <?= I18N::translate('next') ?> 117 </button> 118 119 <button class="btn btn-secondary" name="step" type="submit" value="3"> 120 <?= I18N::translate('previous') ?> 121 </button> 122 </div> 123</form> 124