1<?php 2 3use Fisharebest\Webtrees\I18N; 4use Fisharebest\Webtrees\Webtrees; 5use Illuminate\Support\Collection; 6 7/** 8 * @var string $dbhost 9 * @var string $dbname 10 * @var string $dbpass 11 * @var string $dbport 12 * @var string $dbtype 13 * @var string $dbuser 14 * @var Collection<string> $errors 15 * @var string $lang 16 * @var string $tblpfx 17 * @var Collection<string> $warnings 18 * @var string $wtemail 19 * @var string $wtname 20 * @var string $wtpass 21 * @var string $wtuser 22 */ 23 24?> 25 26<form method="post" autocomplete="off"> 27 <input name="lang" type="hidden" value="<?= e($lang) ?>"> 28 <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>"> 29 <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> 30 <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> 31 <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> 32 <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> 33 <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> 34 <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> 35 <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> 36 <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> 37 38 <h2> 39 <?= I18N::translate('Database connection') ?> – SQLite 40 </h2> 41 42 <?php foreach ($errors as $error) : ?> 43 <p class="alert alert-danger"><?= $error ?></p> 44 <?php endforeach ?> 45 46 <?php foreach ($warnings as $warning) : ?> 47 <p class="alert alert-warning"><?= $warning ?></p> 48 <?php endforeach ?> 49 50 <div class="row form-group"> 51 <label class="col-form-label col-sm-3" for="dbname"> 52 <?= I18N::translate('Database name') ?> 53 </label> 54 55 <div class="col-sm-9"> 56 <div class="input-group" dir="ltr"> 57 <div class="input-group-prepend"> 58 <span class="input-group-text"><?=e((string) realpath(Webtrees::ROOT_DIR)) ?>/data/</span> 59 </div> 60 61 <input class="form-control" id="dbname" name="dbname" pattern="[a-zA-Z0-9_]{1,63}" type="text" value="<?= e($dbname) ?>"> 62 63 <div class="input-group-append"> 64 <span class="input-group-text">.sqlite</span> 65 </div> 66 </div> 67 68 <p class="small text-muted"> 69 <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?> 70 </p> 71 </div> 72 </div> 73 74 <div class="row form-group"> 75 <label class="col-form-label col-sm-3" for="tblpfx"> 76 <?= I18N::translate('Table prefix') ?> 77 </label> 78 79 <div class="col-sm-9"> 80 <input class="form-control" dir="ltr" id="tblpfx" maxlength="15" name="tblpfx" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($tblpfx) ?>"> 81 82 <p class="small text-muted"> 83 <?= 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.') ?> 84 <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?> 85 </p> 86 </div> 87 </div> 88 89 <hr> 90 91 <div class="d-flex justify-content-between"> 92 <button class="btn btn-primary" name="step" type="submit" value="5"> 93 <?= I18N::translate('next') ?> 94 </button> 95 96 <button class="btn btn-secondary" name="step" type="submit" value="3"> 97 <?= I18N::translate('previous') ?> 98 </button> 99 </div> 100</form> 101