1d70512abSGreg Roach<?php 2d70512abSGreg Roach 310e06497SGreg Roachdeclare(strict_types=1); 410e06497SGreg Roach 5*52550490SGreg Roachuse Fisharebest\Webtrees\DB; 6d70512abSGreg Roachuse Fisharebest\Webtrees\I18N; 7dc270d8cSGreg Roachuse Illuminate\Support\Collection; 8dc270d8cSGreg Roach 9dc270d8cSGreg Roach/** 10dc270d8cSGreg Roach * @var string $dbhost 11dc270d8cSGreg Roach * @var string $dbname 12dc270d8cSGreg Roach * @var string $dbpass 13dc270d8cSGreg Roach * @var string $dbport 14dc270d8cSGreg Roach * @var string $dbtype 15dc270d8cSGreg Roach * @var string $dbuser 1636779af1SGreg Roach * @var Collection<int,string> $errors 17dc270d8cSGreg Roach * @var string $lang 18dc270d8cSGreg Roach * @var string $tblpfx 1936779af1SGreg Roach * @var Collection<int,string> $warnings 20dc270d8cSGreg Roach * @var string $wtemail 21dc270d8cSGreg Roach * @var string $wtname 22dc270d8cSGreg Roach * @var string $wtpass 23dc270d8cSGreg Roach * @var string $wtuser 24dc270d8cSGreg Roach */ 25d70512abSGreg Roach 26d70512abSGreg Roach?> 27982d76d1SGreg Roach 2883615acfSGreg Roach<form method="post" autocomplete="off"> 29982d76d1SGreg Roach <input name="lang" type="hidden" value="<?= e($lang) ?>"> 30982d76d1SGreg Roach <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> 31982d76d1SGreg Roach <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> 32982d76d1SGreg Roach <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> 33982d76d1SGreg Roach <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> 34982d76d1SGreg Roach <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> 35982d76d1SGreg Roach <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> 36982d76d1SGreg Roach 37982d76d1SGreg Roach <h2> 38982d76d1SGreg Roach <?= I18N::translate('Connection to database server') ?> 39982d76d1SGreg Roach </h2> 40982d76d1SGreg Roach 41982d76d1SGreg Roach <?php foreach ($errors as $error) : ?> 42982d76d1SGreg Roach <p class="alert alert-danger"><?= $error ?></p> 43982d76d1SGreg Roach <?php endforeach ?> 44982d76d1SGreg Roach 45982d76d1SGreg Roach <?php foreach ($warnings as $warning) : ?> 46982d76d1SGreg Roach <p class="alert alert-warning"><?= $warning ?></p> 47982d76d1SGreg Roach <?php endforeach ?> 48982d76d1SGreg Roach 49982d76d1SGreg Roach <p> 50982d76d1SGreg Roach <?= I18N::translate('webtrees needs a database to store your genealogy data.') ?> 51982d76d1SGreg Roach </p> 52982d76d1SGreg Roach 539e3c2cf9SGreg Roach <div class="row mb-3"> 54982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="dbhost"> 55982d76d1SGreg Roach <?= I18N::translate('Database type') ?> 56982d76d1SGreg Roach </label> 57982d76d1SGreg Roach <div class="col-sm-9"> 58982d76d1SGreg Roach <div class="form-check"> 59*52550490SGreg Roach <input class="form-check-input" type="radio" name="dbtype" id="dbtype-mysql" value="mysql" <?= $dbtype === DB::MYSQL ? 'checked' : '' ?>> 60982d76d1SGreg Roach <label class="form-check-label" for="dbtype-mysql"> 61982d76d1SGreg Roach MySQL 62982d76d1SGreg Roach </label> 63982d76d1SGreg Roach </div> 64982d76d1SGreg Roach 65982d76d1SGreg Roach <div class="form-check"> 66*52550490SGreg Roach <input class="form-check-input" type="radio" name="dbtype" id="dbtype-sqlite" value="sqlite" <?= $dbtype === DB::SQLITE ? 'checked' : '' ?>> 67982d76d1SGreg Roach <label class="form-check-label" for="dbtype-sqlite"> 68982d76d1SGreg Roach SQLite 69982d76d1SGreg Roach </label> 70982d76d1SGreg Roach </div> 71982d76d1SGreg Roach 72982d76d1SGreg Roach <div class="form-check"> 73*52550490SGreg Roach <input class="form-check-input" type="radio" name="dbtype" id="dbtype-pgsql" value="pgsql" <?= $dbtype === DB::POSTGRES ? 'checked' : '' ?>> 74982d76d1SGreg Roach <label class="form-check-label" for="dbtype-pgsql"> 75982d76d1SGreg Roach PostgreSQL 76982d76d1SGreg Roach </label> 77982d76d1SGreg Roach </div> 78982d76d1SGreg Roach 79982d76d1SGreg Roach <div class="form-check"> 80*52550490SGreg Roach <input class="form-check-input" type="radio" name="dbtype" id="dbtype-sqlsrv" value="sqlsrv" <?= $dbtype === DB::SQL_SERVER ? 'checked' : '' ?>> 817a468185SGreg Roach <label class="form-check-label" for="dbtype-sqlsrv"> 82982d76d1SGreg Roach SQL Server 83982d76d1SGreg Roach </label> 84982d76d1SGreg Roach </div> 85982d76d1SGreg Roach 86315eb316SGreg Roach <div class="form-text"> 87315eb316SGreg Roach </div> 88982d76d1SGreg Roach </div> 89982d76d1SGreg Roach </div> 90982d76d1SGreg Roach 91982d76d1SGreg Roach 92982d76d1SGreg Roach <hr> 93982d76d1SGreg Roach 94982d76d1SGreg Roach <div class="d-flex justify-content-between"> 95982d76d1SGreg Roach <button class="btn btn-primary" name="step" type="submit" value="4"> 96982d76d1SGreg Roach <?= I18N::translate('next') ?> 97982d76d1SGreg Roach </button> 983e0eba26SGreg Roach 993e0eba26SGreg Roach <button class="btn btn-secondary" name="step" type="submit" value="2"> 1003e0eba26SGreg Roach <?= I18N::translate('previous') ?> 1013e0eba26SGreg Roach </button> 102982d76d1SGreg Roach </div> 103982d76d1SGreg Roach</form> 104