2023-07-17 21:15:18 +02:00
< ? php declare ( strict_types = 1 ); ?>
2023-06-24 16:54:36 +02:00
< p >
2023-09-19 20:33:44 +02:00
< ? = sprintf ( _ ( 'AAAA, A and CAA records are regularly copied from the source domain to the target domain. Their TTLs are set to %s seconds.' ), NS_SYNC_TTL ) ?>
2023-06-24 16:54:36 +02:00
</ p >
< p >
< ? = _ ( 'Source domains that are not signed with DNSSEC are not synchronized. Synchronizations that remain broken may be deleted.' ) ?>
</ p >
< p >
2023-06-26 04:13:52 +02:00
< ? = _ ( 'This is meant to be used for apex domains, where CNAME records are not allowed. For non-apex domains, CNAME records should be used instead.' ) ?>
2023-06-24 16:54:36 +02:00
</ p >
< form method = " post " >
< ? php
foreach ( array_slice ( array_merge ( query ( 'select' , 'ns-syncs' , [ 'username' => $_SESSION [ 'id' ] ? ? '' ]), [[ 'source' => '' , 'destination' => '—' ]]), 0 , 8 ) as $i => $sync ) {
?>
< fieldset >
2023-06-26 04:13:52 +02:00
< legend >< ? = ( $sync [ 'source' ] === '' ) ? _ ( 'Add new domain records to be synchronized' ) : _ ( 'Synchronized domain' ) ?> </legend>
2023-06-24 16:54:36 +02:00
< div >
< label for = " source<?= $i ?> " >< ? = _ ( 'Source domain' ) ?> </label><br>
< input placeholder = " provider.<?= PLACEHOLDER_DOMAIN ?>. " id = " source<?= $i ?> " name = " syncs[<?= $i ?>][source] " value = " <?= $sync['source'] ?> " type = " text " >
</ div >
< div >
< label for = " destination<?= $i ?> " >< ? = _ ( 'Target domain' ) ?> </label>
< br >
< select required = " " name = " syncs[<?= $i ?>][destination] " id = " destination<?= $i ?> " >
< option < ? = (( $sync [ 'destination' ] === '' ) ? 'value="" disabled=""' : 'value="' . $sync [ 'destination' ] . '"' ) ?> selected=""><?= $sync['destination'] ?></option>
< ? php
2023-10-08 00:50:48 +02:00
foreach ( array_diff ( nsListUserZones (), query ( 'select' , 'ns-syncs' , [ 'username' => $_SESSION [ 'id' ] ? ? '' ], [ 'destination' ])) as $zone )
2023-06-24 16:54:36 +02:00
echo " <option value=' " . $zone . " '> " . $zone . " </option> " ;
?>
</ select >
</ div >
</ fieldset >
< ? php
}
?>
< input type = " submit " value = " <?= _('Update') ?> " >
</ form >